Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Flushing and array ?

by bgants (Novice)
on Nov 18, 2000 at 03:12 UTC ( #42302=perlquestion: print w/replies, xml ) Need Help??

bgants has asked for the wisdom of the Perl Monks concerning the following question:

I have a strange situation, and am quite baffled. I am using the following snippet of code,
for my $i (0..$#{@{$ChargesArray}}) { my @temp_array = @{$ChargesArray->[$i]}; my $buff_4 = "@temp_array"; # print "@temp_array\n"; }
When I print or assign the @temp_array in quotes to a dummy variable, things work, the array goes and gets processed. However if I don't print or assign it to a dummy variable everything seems to break ?? Can anyone explain why. It seems as though the print and or assignment in quotes flushes something ? I stumbled upon this as I was removing all my print/debug statements, it took me several hours to isolate four places where this occurred in the code.

Replies are listed 'Best First'.
Re (tilly) 1: Flushing and array ?
by tilly (Archbishop) on Nov 18, 2000 at 03:20 UTC

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (7)
As of 2019-11-17 12:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Strict and warnings: which comes first?



    Results (86 votes). Check out past polls.

    Notices?