Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: print and say

by choroba (Cardinal)
on Sep 12, 2017 at 09:12 UTC ( [id://1199175]=note: print w/replies, xml ) Need Help??


in reply to print and say

1) What do you mean by "store"? If you want to store it in a variable, assign the function call to the variable:
my $result = myfunct($str1, $str2);

To store it in a file, print to a file:

open my $OUT, '>', $filename or die $!; say {$OUT} myfunct($str1, $str2); close $OUT;

2) Documented in say:

Just like print, but implicitly appends a newline. say LIST is simply an abbreviation for { local $\ = "\n"; print LIST }.

($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (4)
As of 2024-04-25 13:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found