Help for this page

Select Code to Download


  1. or download this
    my $num_of_params;
    $num_of_params = @ARGV;
    ...
    {
    die ("\n You haven't entered enough parameters !!\n\n");
    }
    
  2. or download this
    die "\nYou haven't entered enough parameters !!\n\n" unless $ARGV[1];
    
  3. or download this
    open (INFILE, $ARGV[0]) or die "unable to open file";
    
    open (OUTFILE, ">$ARGV[1]");
    
  4. or download this
    open (INFILE, $ARGV[0]) or die "unable to open file $ARGV[0]: $!\n";
    open (OUTFILE, ">$ARGV[1]") or warn "unable to open file $ARGV[1]: $!\
    +n";
    
  5. or download this
      -snip-
            @array = ();
            @array = split (/\s+/, $line);
      -snip-
    # if i print $self here it prints out all of the results from that cat
    +ergory
    
  6. or download this
    $choice = <STDIN>;
    
    ...
    chomp $choice;
    
    if ($choice eq 1)
    
  7. or download this
    if (getc(STDIN) eq "1")