Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: filehandle regex

by ikegami (Pope)
on Nov 16, 2010 at 19:57 UTC ( #871818=note: print w/ replies, xml ) Need Help??


in reply to filehandle regex

I am using $` but it does not display any output.

There's nothing before /^/ in the matched variable, so there's nothing in $`.

The solution is to stop overwriting the value you want.

my $prev; while (<>) { print($prev) if /^Func_file_permission$/; $prev = $_; }


Comment on Re: filehandle regex
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (7)
As of 2015-07-08 00:27 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 (93 votes), past polls