Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Re: Re: Script crazy after a lot of testing and terminating

by antirice (Priest)
on Jul 22, 2003 at 23:34 UTC ( [id://276959]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Script crazy after a lot of testing and terminating
in thread Script crazy after a lot of testing and terminating

Well, your $/ = ""; causes your while (<F>) to slurp the entire file into $_ and the while statement executes once. Setting $\ = ""; is somewhat unncecessary as that's its default (unless you run with -l). The structure of your foreach is...umm...interesting. Splicing the array is unnecessary since it falls out of scope at the end of the outer while. I don't know what $cat contains...I suspect it's a program but? Does the program return different data each time it's called? Beyond that, what is this script doing that you aren't expecting?

antirice    
The first rule of Perl club is - use Perl
The
ith rule of Perl club is - follow rule i - 1 for i > 1

Replies are listed 'Best First'.
Re: Re: Re: Re: Script crazy after a lot of testing and terminating
by bh_perl (Monk) on Jul 27, 2003 at 04:07 UTC
    Hi, Thanks for your advise, Right now my perl is back... I have re-run my perl step by step and replace all the unnecessary items then it's OK... Might be because of them..

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (4)
As of 2024-04-16 19:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found