Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
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 = $_; }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://871818]
help
Chatterbox?
[marto]: yay, Depeche Mode at the Barrowlands on Sunday. The best venue in Glasgow for music, despite it's looks :) Also the smallest gig DM will have played in a long time

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (12)
As of 2017-03-24 11:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (301 votes). Check out past polls.