On Thu, 13 Mar 2003, Mark A. Chalkley wrote: > Ok, a dumb question here (I must be having a brain halt...): > > Given the following snippet of code to load data from a file into a > hash, > > while( <DATA> ) { /(.*)\,(.*)/ && ($hash{$1} = $2) }; > > > what does the '&&' do? >
It's a logical AND operator so that the hash assignment is done only when the regex matches. However the regex is pretty sloppy. Note tbe following lines all will match: ?<>,* , , #,# screwed,eval {`format drive C: \\V:x \\U`} **** [EMAIL PROTECTED] <Carl Jolley> **** All opinions are my own and not necessarily those of my employer **** _______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs