Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^3: Functions (Return V Print)

by cjb (Friar)
on Feb 04, 2011 at 11:05 UTC ( #886187=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Functions (Return V Print)
in thread Functions (Return V Print)

If you're returning title are you assigning it to a variable on it's return?

#!/opt/perl/bin/perl use strict; use warnings; my $title="name"; print "$title\n"; $title = &function64("name"); print "$title\n"; sub function64 { my ($title) = @_; $title="$title " x 3; return ($title); }


Comment on Re^3: Functions (Return V Print)
Download Code
Re^4: Functions (Return V Print)
by cjb (Friar) on Feb 04, 2011 at 11:22 UTC

    Ignore me, you are, just re-read your original post.

    Errr, ignore my ignore, you've not shown enough code. Could you show us where you're calling the function?

    Updated: 20110204 11:53 GMT

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (17)
As of 2015-07-01 15:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (5 votes), past polls