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

Re: print and say

by choroba (Bishop)
on Sep 12, 2017 at 09:12 UTC ( #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
Node Status?
node history
Node Type: note [id://1199175]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2017-10-20 09:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My fridge is mostly full of:

















    Results (260 votes). Check out past polls.

    Notices?