Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: the greedy diamond, or leggo my STDIN

by Moron (Curate)
on Jul 04, 2007 at 08:46 UTC ( #624845=note: print w/ replies, xml ) Need Help??


in reply to the greedy diamond, or leggo my STDIN

or transfer the stream to arguments...

$ ls | xargs sillytest
#!/usr/bin/perl my @msg = join "\n", @ARGV; # continue normally - STDIN was not redirected by xargs
update: and if on a non-*nix platform, you can roll your own xargs easily enough:
#!/usr/bin/perl # XARGS.EXE v0.1 shift @ARGV; push @ARGV, <STDIN>; chomp @ARGV; exec join( ' '. @ARGV;
__________________________________________________________________________________

^M Free your mind!


Comment on Re: the greedy diamond, or leggo my STDIN
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2014-12-18 23:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (67 votes), past polls