Thread while + STDIN (7 answers)
Opened by RPerl at 2007-06-16 11:31

GwenDragon
 2007-06-16 12:21
#77566 #77566
User since
2005-01-17
14837 Artikel
Admin1
[Homepage]
user image
Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
11
12
#!/usr/bin/perl

use strict;
use warnings;

my ($string) = '';

while (1) {
  $string = <STDIN>;
  chomp($string);
  last if ($string eq 'exit');
}
\n\n

<!--EDIT|GwenDragon|1181986396-->

View full thread while + STDIN