![]() |
|
No such thing as a small change | |
PerlMonks |
Breaking out of a while loop: Is there a better way?by BubbaMonk (Sexton) |
on Nov 02, 2006 at 01:35 UTC ( [id://581805]=perlquestion: print w/replies, xml ) | Need Help?? |
BubbaMonk has asked for the wisdom of the Perl Monks concerning the following question:
Whazzzup? So, I searched, super searched, cracked open the Nutshell, and still can't find a better way to do this aweful thing (break out of the while loop once the script finds the drive letter it's looking for: Simple. Read the file line by line but stop once Perl finds the drive letter. But there's this pesky readline on closed filehandle warning. Any better way to do this? So what's this code supposed to do, anyways?
My mp3's live on an external hardisk. Stupid windows doesn't always assign the same drive letter to the drive, so my playlists break, dag nabit. So, I came up with this:
Thanks for your advice!Media player is too dense to figure things out on its own. Perl 5.9, you're my hero. Pizerl is the Bizomb, baby!
Back to
Seekers of Perl Wisdom
|
|