use warnings; use strict; my $in = 'file' my $out = 'file2'; open my $OUT, '>', $out or die $!; if (-s $in) { open my $IN, '<', $in or die $!; while (<$IN>) { my $line = $_; chomp $line; print $OUT "$line\n"; print $OUT "you need to do this\n"; print $OUT " \n"; } } else { print $OUT "There is nothing to do\n"; }
In reply to Re^2: if/while/else problem
by eff_i_g
in thread if/while/else problem
by ddrew78
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |