Help for this page

Select Code to Download


  1. or download this
    my $file = 'somefile.txt';
    open (THEFILE, ">$file") ||
       die "Could not create $file - $!\n";
    
  2. or download this
    my $file = 'somefile.txt';
    open (THEFILE, ">$file") or
       die "Could not create $file - $!\n";
    
  3. or download this
    my $command = "/bin/cp fileone filetwo";
    system ($command) and
       die "Fooey, $command - $!\n";
    
  4. or download this
    my $command = "/bin/cp fileone filetwo";
    system ($command) &&
       die "Fooey, $command - $!\n";