Re: Writing this chuck of code a little smaller...

2002-03-14 Thread Tanton Gibbs
ot; <[EMAIL PROTECTED]> To: "Tanton Gibbs" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Thursday, March 14, 2002 9:32 PM Subject: RE: Writing this chuck of code a little smaller... > Tanton, > > Thanks, that's alot better now! Out of curiosity. At

RE: Writing this chuck of code a little smaller...

2002-03-14 Thread Daniel Falkenberg
\s*(.*?)\s*$/; $filehash{$title}{$1} = $2; } close FILE; return %filehash; } Does this look stupid to you or is this actually possible? Regards, Da -Original Message- From: Tanton Gibbs [mailto:[EMAIL PROTECTED]] Sent: Friday, 15 March 2002 12:48 PM To: Daniel Falkenberg; [

Re: Writing this chuck of code a little smaller...

2002-03-14 Thread Tanton Gibbs
Well, I would think you could rewrite it like: for( $poll ) { $filehash{$title}{"Newspaper"}++, last if( /newspaper/ ); $filehash{$title}{"Word of Mouth"}++, last if( /wordofmouth/ ); $filehash{$title}{"Friend"}++, last if( /friend/ ); die "Should not get here!"; } write_results( $