Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re^3: Iterator to parse multiline string with \\n terminator

by Athanasius (Chancellor)
on Oct 06, 2013 at 16:28 UTC ( #1057164=note: print w/replies, xml ) Need Help??

in reply to Re^2: Iterator to parse multiline string with \\n terminator
in thread Iterator to parse multiline string with \\n terminator

++tinita for highlighting the important difference between testing for definedness and testing for truth (see perlsyn#Truth-and-Falsehood).

But even with the correction I prefer my version. Readability is in the eye of the programmer, but the first high-level programming subject I took at Uni (in Pascal!) emphasised structured programming, and this has remained with me. I prefer a function to have a single exit point (at the end) where possible. In Perl this is not always optimum, so I’ve had to learn to be flexible. But when — as in this case — the structured version is as straightforward as the non-structured one, I prefer the former. YMMV.

As always in Perl, TMTOWTDI.

Athanasius <°(((><contra mundum Iustus alius egestas vitae, eros Piratica,

  • Comment on Re^3: Iterator to parse multiline string with \\n terminator

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1057164]
[shmem]: you can break up the chain MP3::Tag->new($_)- >interpolate("\%S ") and test whether MP3::Tag->new($_) is true
[Lady_Aleena]: shmem, no to deletion.
[shmem]: can't help you there since that song is not on my bench
[Lady_Aleena]: shmem, I need to look at MP3::Tag to see how to get the date from one song.
shmem sticks himself into the envelope. gn.(1<<3) all

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2017-04-23 22:19 GMT
Find Nodes?
    Voting Booth?
    I'm a fool:

    Results (432 votes). Check out past polls.