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

Re^5: improving the aesthetics of perl code

by sleepingsquirrel (Hermit)
on Jan 21, 2005 at 22:43 UTC ( #424157=note: print w/replies, xml ) Need Help??


in reply to Re^4: improving the aesthetics of perl code
in thread improving the aesthetics of perl code

Why not...
@hosts = map { /^([\w.]+)$/ ? $1 : () } @tmp;
update: might as well get rid of the @tmp while we're at it...
@hosts = map { /^([\w.]+)$/ ? $1 : () } <CFGFILE>;


-- All code is 100% tested and functional unless otherwise noted.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://424157]
help
Chatterbox?
[1nickt]: pryrt I guess I don;t really care if user 42 logs on as 42.0 ... more of an academic question at this point.
[LanX]: jdporter: open PIPE,'-|' ?
[LanX]: oh you want the result line by line?
[jdporter]: ok, LanX, then what?
[jdporter]: It doesn't have to be line by line. Just "my program" "writes" to the external prog and also/then "reads" from it.
LanX open (You are not allowed to open to a command that pipes both in and out, but see IPC::Open2, IPC::Open3, and Bidirectional Communication with Another Process in perlipc for alternatives.)
[jdporter]: IPC::Open2, I guess
[jdporter]: yes, that

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (13)
As of 2017-05-24 20:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?