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

Re: Scalar function

by MidLifeXis (Monsignor)
on Sep 07, 2012 at 17:11 UTC ( #992351=note: print w/replies, xml ) Need Help??


in reply to Scalar function

If $fa, $fb, and $fc are file handles, then

print CSV $_, scalar <$fa>, scalar <$fb>, scalar <$fc>;
is doing the equivalent of
my $line_a = <$fa>; my $line_b = <$fb>; my $line_c = <$fc>; print CSV $_, $line_a, $line_b, $line_c;
Note that there is no chomp on the reads from the three files.

--MidLifeXis

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://992351]
help
Chatterbox?
[Lady_Aleena]: Has anyone here ever use pcregrep? I can't seem to get the --include regex right. --include=*.p[lm] works in grep but not pcregrep.
[erix]: to lift your spirits, here is some more happy Randy news...
[Lady_Aleena]: The reason I would like to use pcregrep is because it can do multiline searches supposedly.
[perldigious]: What are your criteria for looking Tanktalus? What things must a job have for you to consider it? And where are you in your career? Start, middle, or end?
[erix]: are there any regex-engines that do not do multiline?
[Lady_Aleena]: erix, grep doesn't.
[Lady_Aleena]: Linux grep that is...
[Lady_Aleena]: $ grep --include=*.p[lm] -Ern 'get_(array|hash| data)' does not do multiline search.
[Discipulus]: focus on Perl LA; you can already search multiline patterns
[erix]: grep is a program, not a regex-engine

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (12)
As of 2017-05-23 19:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?