in reply to Re: Question on File Handler and Subroutines in Perl
in thread Question on File Handler and Subroutines in Perl
Hi tobyink,
Ah yes, you are right. It keeps getting stuck at the file a.txt and printing only the contents out from it. :( Now I know why. It's because of the "\n". I will read up what chomp does. Thank you for the hint! :) The book "Learn Perl the Hard Way" really lives up to its name. Haha. Oh dear.
Ah yes, I realized that "my $file = scalar(@_)" isn't doing anything too after debugging it yesterday. Thank you for pointing it out. Just wondering, does that statement convert an array "stream" into a scalar quantity, e.g. a string?
Thank you (:
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Question on File Handler and Subroutines in Perl
by hippo (Archbishop) on Mar 06, 2019 at 09:01 UTC |