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 06: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.