Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re: process a file and reading a line and passing the values to another sub function

by LanX (Bishop)
on Dec 12, 2012 at 16:28 UTC ( #1008524=note: print w/replies, xml ) Need Help??

in reply to process a file and reading a line and passing the values to another sub function

please try to condense code to the relevant parts or mark them better.

I really started counting the lines till 35 before I saw your comment.

something like:

$line = <FILE>; # <---------- 35 # this line doesn't work. don't know what's wrong here..

is easier to find.

anyway, you did it twice:

@buf = <FILE>; # you reading all lines of FILE i +nto @buf foreach $line (@buf) { # OK! (well, "my $line" would be +better) $line = <FILE>; # but now reading again a single +line !?! # which is undef after EOF

please less cargo cult programming!

Don't c&p different approaches from other snippets, better try to understand what's happening.

Cheers Rolf

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1008524]
[LanX]: talking about comic adaptions ... I really liked the Watchmen
[LanX]: look I can give you a long list of excellent US movies
[Your Mother]: I adored the comic and the movie was almost a frame for frame remake (excepting the plot liberties to shorten it) but I still didn't quite like it. What's his nose, Jamie Earl whoever was flawless though.
LanX though probably produced outside Holywood
[Your Mother]: There are tons of good movies from all over but for every gem there is a pile of dirt 10 meters high burying it.
[LanX]: well
[LanX]: who's Jamie Earl?
[Your Mother]: Also: I am old and complaining is my hobby.
[LanX]: BTW: have you ever seen Network?
[Your Mother]: Sorry: Jackie Earle Haley

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (14)
As of 2018-03-19 15:00 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (240 votes). Check out past polls.