On Wed, Dec 12, 2012 at 12:16 PM, Andy Bach <afb...@gmail.com> wrote:

> I used a temp var as you had ("$cookie"), but in this case, using the
> default while usage assings directly to $_:
> while (  <> ) {
>         if ( $_  eq 'cookie') {
>

"assigns directly to $_"



> and that gets easier with regular expression matching:
>
> while ( my $cookie = <> ) {
>         chomp($cookie);
>         if ( /cookie/ ) {
>
> means "if $_ contains the word cookie"
>

Er, that was fubar - S/B:
while ( <> ) {
        if ( /cookie/ ) {

Good luck!
-- 

a

Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk

Reply via email to