Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: foreach/while loop help

by u65 (Chaplain)
on Jul 13, 2015 at 10:37 UTC ( [id://1134475]=note: print w/replies, xml ) Need Help??


in reply to foreach/while loop help

And, aside from the other good advice above, you should add 'use strict;' after the shebang line ('#!/usr/bin/perl').

Replies are listed 'Best First'.
Re^2: foreach/while loop help
by bshah (Novice) on Jul 13, 2015 at 22:13 UTC

    Thank you for your valuable suggestions.

    I found the issue. When I open the file handle, I did close it so when it looked for the 2nd element from the list, there was nothing to match.
    Thank you again.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1134475]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (7)
As of 2024-04-24 11:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found