Beefy Boxes and Bandwidth Generously Provided by pair Networks Joe
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Re: newbie hasher

by prodevel (Scribe)
on Nov 20, 2003 at 00:45 UTC ( [id://308513]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Re: newbie hasher
in thread newbie hasher

By no means am I discounting the other methods, but I really like this one-liner due to my haphazzard knowledge of regex:

%hostlist = <DATA> =~ /^(\w+)+\s(.*)/gm;

This is exactly what I was looking for even though I was no where near explicit about what I wanted.

I'm already applying this method to a few more scripts. The map was cool too.

I am somewhat curious as to the extensive use of Data::Dumper instead of print-ing %hash?

Thanks all!

Replies are listed 'Best First'.
Re: Re: Re: newbie hasher
by ysth (Canon) on Nov 20, 2003 at 01:17 UTC
    I am somewhat curious as to the extensive use of Data::Dumper instead of print-ing %hash?
    Just shows the structure better, and shows up any undefs, tabs, newlines, wide characters, unprintable characters, etc. that sneak into your data better.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://308513]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.