Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^2: [OT]: Re^9: What's the right way to write a method which returns one line at a time from a file?

by AnomalousMonk (Bishop)
on Nov 26, 2020 at 10:07 UTC ( #11124254=note: print w/replies, xml ) Need Help??


in reply to Re: [OT]: Re^9: What's the right way to write a method which returns one line at a time from a file?
in thread What's the right way to write a method which returns one line at a time from a file?

# When their name is... Address them as... my $salute = $name eq $EMPTY_STR ? 'Customer' : $name =~ m/(.*), \s+ Ph[.]?D \z /xms ? "Dr $1" : ? $name ;

One ? too many:

Win8 Strawberry 5.8.9.5 (32) Thu 11/26/2020 5:03:36 C:\@Work\Perl\monks >perl -Mstrict -Mwarnings -l my $name = 'xyzzy'; my $salute = $name eq 'foo' ? 'Fooble' : $name eq 'bar' ? 'Barfly' : $name ; print $salute; ^Z xyzzy


Give a man a fish:  <%-{-{-{-<

  • Comment on Re^2: [OT]: Re^9: What's the right way to write a method which returns one line at a time from a file?
  • Select or Download Code

Replies are listed 'Best First'.
Re^3: [OT]: Re^9: What's the right way to write a method which returns one line at a time from a file?
by eyepopslikeamosquito (Bishop) on Nov 26, 2020 at 10:20 UTC

    Yes, I've corrected the offending node. Thanks.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2021-04-12 01:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?