- or download this
#!/usr/bin/perl
- or download this
no strict; # Yuk!
no warnings; # Yuk!
# s/no/use/gsm;
- or download this
my $step1;
my $step2;
...
my @array1;
my @array;
my $i = 0;
- or download this
open(FILE, "assign");
- or download this
open my $fh, '<', 'assign' or
die "hard, but say why (\$!): $!\n";
- or download this
$line = <FILE>;
while ($line ne ""){
- or download this
while (<$fh>) { ... # or
while (my $line=<$fh>) { ...
- or download this
chomp($line);
if($line =~ /^(\S+)\s+(\d+)$/) {
print "inside\n";
$hash{$1} = $2;
- or download this
$i++;
- or download this
while( ($key, $value) = each %hash) {
print "$key +> $value\n";
$key = $value;
}
- or download this
#!/usr/bin/perl -ln
...
}
__END__