Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Fellow Monks, consider the following code
#!/usr/bin/perl use warnings; use strict; my $content; open(IN, "<", $ARGV[0]) or die $!; while ( $content .= <IN> ) { print $content; }; close(IN) or die $!;
Can someone explain in laymans words why .= causes an endless while loop?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: endless loop while .=
by almut (Canon) on Jan 23, 2010 at 13:28 UTC | |
by Anonymous Monk on Jan 23, 2010 at 13:39 UTC | |
|
Re: endless loop while .=
by Marshall (Canon) on Jan 23, 2010 at 13:42 UTC | |
|
Re: endless loop while .=
by apl (Monsignor) on Jan 23, 2010 at 13:26 UTC |