- or download this
#!/user/bin/perl -w
...
#this hash is used for referencing purposes
@array = %hash1;
- or download this
#initiate a loop counter
$loop = 0;
#using for loop to get rid of new line in the array
for (@array){ $array[$loop] =~ s/\n//; $loop++ }
- or download this
#opening file for writing
open (Done, ">sim.c") or die "Can't open sim.c :$!\n";
- or download this
#initiating a new hash and a string for later use
%hash2;
$done;
- or download this
#a for loop to help popping all the elements in array.
for (0..6){
$fish = pop @array;
$fish = pop @array;
- or download this
#opening of working file, which is to be compared with
#the reference array(%hash1)
...
close Local;
}
}
- or download this
#print each key of the hash to verify result
foreach $done ( keys %hash2){
print "$done\n";
}
- or download this
$;=sub{$/};@;=map{my($a,$b)=($_,$;);$;=sub{$a.$b->()}}
split//,".rekcah lreP rehtona tsuJ";$\=$ ;->();print$/