Help for this page

Select Code to Download


  1. or download this
    print "Foo...\n" if $verbose;
    
  2. or download this
    my @array = ( "foo", "bar", "baz" );
    my $i;
    ...
    for( $i = 0; $i < $array_size; $i++ ) {
      ...do something with $array[$i]...including assigning to it
    }
    
  3. or download this
    my @array = ( "foo", "bar", "baz" );
    foreach my $value ( @array ) {
      ...do something with $value...including assigning to it
    }
    
  4. or download this
    #!/usr/bin/perl -w
    ...your script here...
    
  5. or download this
    use strict;