Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -w
    
    ...
    exit 1 if $yesno =~ /^[nN]$/;
    
    print "Did not stop, sorry!\n";
    
  2. or download this
    $ echo -e "aaa\nbbb\nccc\n" | script.pl -d
    OK? [Y|n]>
    Use of uninitialized value in scalar chomp at script.pl line 23, <STDI
    +N> line 4.
    Use of uninitialized value in pattern match (m//) at script.pl line 24
    +, <STDIN> line 4.
    Did not stop, sorry!