in reply to Re: accessing/printing specific rows in a flat file DB
in thread accessing/printing specific rows in a flat file DB

yosefm,
One minor nit:
print qq~ $itemName, $nmPrice ~ if $productId =~ m"^B00";

You have to make the m explicit if you are going to change the default delimiters in a match.

Cheers - L~R

Update: Apparently I am wrong and my apologies. It seems that the only time you have to make the m explicit if you are also dropping the binding operator by working on the default $_ as in if /^foo/ can't be done as if |^foo| it needs to be done as if m|^foo|

Replies are listed 'Best First'.
Re: Re: Re: accessing/printing specific rows in a flat file DB
by projekt21 (Friar) on Aug 01, 2003 at 16:32 UTC

    That was what I thought when reading, too, but it seems to work.:

    > perl -e '$a="abcd"; print "yes\n" if $a =~ "^abc";' yes > perl -e '$a="abcd"; print "yes\n" if $a =~ "^yyy";' >

    Strange, anyone knows more about this?

    alex pleiner <alex@zeitform.de>
    zeitform Internet Dienste