There's more than one way to do things | |
PerlMonks |
Re^3: to copy certain content in file & repeat it .by Anonymous Monk |
on Jun 30, 2011 at 10:39 UTC ( [id://912144]=note: print w/replies, xml ) | Need Help?? |
Hi, the code you posted does not compile, part of asking a question effectively, is to make sure your code compiles before posting.
This reads from a file until it reaches the end. Filehandles are iterators. Once you reach the end, the subsequent while(<FH>) loop will not be entered
@arr =$_; This sets @arr to the value of $_; It doesn't add values to @arr, for that you need the push function
In Section
Seekers of Perl Wisdom
|
|