[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Omaha.pm] shorter is gooder



On Sep 21, 2010, at 4:23 PM, Dan Linder wrote:
> Are those the same?  The first "/ZUPSUITE/" could find it anywhere in the line, but the second one forces it to be at the beginning of the line, correct?
> 
> (Though if your data won't have "ANOTHERZUPSUITE", then this isn't a problem...)

Indeed. Good catch. In my real application "ZUPSUITE" was abandoned in favor of "must start with Z, cannot start with ZUP_", so my real code is fine with the ^ in front.

   next if (!$packageCode or $packageCode =~ /^([^Z]|ZUP_)/);

Thanks,

Jay Hannah
Software Architect
jhannah@mutationgrid.com | http://mutationgrid.com | 1-402-598-7782