Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: How to "transfer control" to child process?

by John M. Dlugosz (Monsignor)
on May 23, 2011 at 20:09 UTC ( [id://906355] : note . print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    foreach my $line (@configFile) {
       next if $line =~ /^\s*$/;
       ...
    
  2. or download this
    foreach (@configFile) {
       chomp;  # careful of last line in file
    ...
          $error = 1;
       }
    }
    
  3. or download this
       when (/^\s*(ScriptName:)\s+(\S+)\s*$/) {
          $tag= $1;
          $scriptName= $2;
       }
    
  4. or download this
       when (/^\s*Step\s+(\d):\s*(.*)/) {
          $stepNum = $1;
          $command = $2;
          $step[$stepNum] = $command;
       }
    
  5. or download this
    foreach my $command (@step) {
       next unless defined $command;  # skip unused numbers
       my $ret= system ($command);
       ...
     }