Help for this page

Select Code to Download


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