Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Constructing hashes

by hbm (Hermit)
on Jun 05, 2013 at 11:35 UTC ( #1037188=note: print w/replies, xml ) Need Help??


in reply to Constructing hashes

I second the suggestion - use $_ in your inner loop:

for my $server (@servlist) { my @cmd = `pulldata -e $server`; for (@cmd) { ...

Your regex is malformed - use //, or another delimiter like m##. And the trailing dot-star is wasteful.

#if ($line =~ '^\s+(\w+):\s.*') if ($line =~ /^\s+(\w+):\s/)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (2)
As of 2021-09-19 15:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?