Help for this page

Select Code to Download


  1. or download this
    second_program filename            # as a command line option
    echo "filename" | second_program   # piped into its standard input
    
  2. or download this
    system "./second_program", $filename and die ... # pass it on the comm
    +and line
                                                     # note, system needs 
    +"and" for error checking
    
    open my $fh, "| ./second_program"    or  die ... # via stdin
    print $fh $filename;                             # (note, no comma on 
    +this line)