User Input: Difference between revisions

From Rosetta Code
Content deleted Content added
Creation, inclusion of data from old console-only page.
 
No edit summary
Line 5: Line 5:


'''Interpreter:''' [[Perl]] 5.8.8
'''Interpreter:''' [[Perl]] 5.8.8
<pre><nowiki>#!/usr/bin/perl -w
#!/usr/bin/perl -w

use strict;
use strict;

my $string = <STDIN>;
my $string = <STDIN>;
my $integer = <STDIN>;</nowiki></pre>
my $integer = <STDIN>;


==UNIX Shell==
==UNIX Shell==


'''Interpreter:''' [[Debian Almquish Shell]] (dash)
'''Interpreter:''' [[Debian Almquish Shell]] (dash)
<pre><nowiki>
#!/bin/sh

read STRING
read INTEGER</nowiki></pre>


#!/bin/sh
read STRING
read INTEGER
'''Interpreter:''' [[Bourne Again SHell]] (bash)
'''Interpreter:''' [[Bourne Again SHell]] (bash)
<pre><nowiki>
#!/bin/bash

read STRING
read INTEGER</nowiki></pre>


#!/bin/bash
=GUI=
read STRING
read INTEGER

Revision as of 20:51, 9 January 2007

In this task, the goal is to input a string and the integer 75000, from the normal user interface.

Text Terminal

Perl

Interpreter: Perl 5.8.8

#!/usr/bin/perl -w

use strict;

my $string = <STDIN>;
my $integer = <STDIN>;

UNIX Shell

Interpreter: Debian Almquish Shell (dash)

#!/bin/sh

read STRING
read INTEGER

Interpreter: Bourne Again SHell (bash)

#!/bin/bash

read STRING
read INTEGER