Help for this page

Select Code to Download


  1. or download this
        my @args = map{ ($_, foo($arg{$_})) } keys %args;
        my @output = `/bin/foo @args`;
    
  2. or download this
      system( '/bin/foo    -p    stuff' ); # passes by the shell
      system( '/bin/foo', '-p', 'stuff' ); # bypasses the shell
    
  3. or download this
      my @out = `/bin/foo`, qw/-p stuff/;
    
  4. or download this
    my $pid;
    if( !defined($pid = open( KIDP, '-|' ))) {
    ...
         exec '/usr/local/bin/check-netscreen', @args;
         die "ping child died \$!=$! \$@=$@\nargs = @args";
    }
    
  5. or download this
    #! /usr/bin/perl -w
    
    use strict;
    
    my @out = readpipe( '/bin/foo', qw/one two three/ );