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

Re: Filehandle problem

by Random_Walk (Prior)
on May 07, 2013 at 11:18 UTC ( [id://1032461]=note: print w/replies, xml ) Need Help??


in reply to Filehandle problem

What is the variable $required_line for? What are in $signal[1|2] My guess is that this is a fragment of a larger script. Can you give an example of some input lines as well please?

Why are you using $1 as the variable to write? What do you think happens to this variable during pattern match failure?

Cheers,
R.

Pereant, qui ante nos nostra dixerunt!

Replies are listed 'Best First'.
Re^2: Filehandle problem
by amma (Novice) on May 07, 2013 at 11:22 UTC

    Hi, I am storing the value whatever is matched in the if condition in the $required_line variable. The data file is too large of 40k lines.

      Just a couple of lines of the input demonstrating a match and a fail would help. Try replacing the use of $1 with something other than a special variable, I typically use $line. Then see how you get on.

      Cheers,
      R.

      Pereant, qui ante nos nostra dixerunt!
        ................................. ................................. s_abc_in(1450) <= s_abc_out(324); # this is my first match s_abc_in(1451 <= s_abc_out(1450); .................................

        After the first match , the if condition should execute and place lines of for loop. if it fails the remaining lines of the whole original file should go into the new file. This is my requirement.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2024-04-20 02:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found