Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Synchronizing STDERR and STDOUT

by OfficeLinebacker (Chaplain)
on Sep 21, 2006 at 12:30 UTC ( [id://574112]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/opt/local/bin/perl -w
    ######################################################################
    +#############
    ...
      for (@_ ? @_ : $_) { s/^\s+//, s/\s+$// }
      return wantarray ? @_ : $_[0] if defined wantarray;
    }
    
  2. or download this
    #% is the modulo operator so it's switching back and forth between eve
    +n and odd numbers
    $|++;
    ...
       if ($i % 2){ print STDERR $i; }
       else {print $i;}
     }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://574112]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2024-04-25 06:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found