Help for this page

Select Code to Download


  1. or download this
    open(HAND,"mysql -u $user -p$pass $db < $file | 2>&1") 
          or return "failed: $!";
    
  2. or download this
    my $user = <STDIN>;
    chomp $user;
    ...
         # if $user = "fred; rm -rf *;" then your script will
         # try very very hard to remove everything in its    
         # working directory.
    
  3. or download this
    #!/usr/bin/perl -wT 
    # the -T flag turns on taint checking
    ...
    
    open (HAND, "mysql -u $user") or die "error $!";
         # only good values of $user get to here