Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

RE: RE: I use return on a subroutine

by BBQ (Deacon)
on May 27, 2000 at 06:43 UTC ( #15142=note: print w/replies, xml ) Need Help??

in reply to RE: I use return on a subroutine
in thread I use return on a subroutine

Interesting... I do it the other way around!
my $txt2print = MySub('This text') or warn('MySub said 0'); print $txt2print; sub MySub { my $txt = shift; $txt = { do something here } or return(0); return($txt); }
or is that what you where saying all along?

Replies are listed 'Best First'.
RE: RE: RE: I use return on a subroutine
by elwarren (Curate) on May 28, 2000 at 19:18 UTC
    Sometimes I do this too. I guess it's just a matter of preference. Does anyone have a reason to use one or the other?

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://15142]
[Corion]: erix: It's needed for keeping the list of users and the list of tags associated with an image, and for keeping the images with users. I want an easy way to know if an image can be deleted, which means that it can't be referenced by any tag anymore. ...
[Corion]: SQL feels like a natural choice here :)

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (12)
As of 2018-03-20 14:10 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (253 votes). Check out past polls.