Hi,
Why my code below fail to open and
print the file contents
when I do:
perl mycode.pl -f filename
Regards,
Edward WIJAYA
SINGAPORE
__BEGIN__
use strict;
use warnings;
use Getopt::Std;
use vars qw($f);
getopts('f:');
my $f = $ARGV[0];
open ( INFILE, '', $f)
or die $0 : failed to open
Hi Edward!
On Tue, 28 Sep 2004 18:51:12 +0800, Edward Wijaya
[EMAIL PROTECTED] wrote:
Hi,
Why my code below fail to open and
print the file contents
when I do:
perl mycode.pl -f filename
Regards,
Edward WIJAYA
SINGAPORE
__BEGIN__
use strict;
use warnings;
Good Start! Those
Hi again, Edward!
Just so you know, you should CC the list when you reply!
On Tue, 28 Sep 2004 22:26:55 +0800, Edward Wijaya
[EMAIL PROTECTED] wrote:
Thanks Errin,
It works just as you suggested.
Thanks so much for your thorough
explanation. Glad that I learnt much from it.
Edward, I
On Tue, 28 Sep 2004, Errin Larsen wrote:
On Tue, 28 Sep 2004 18:51:12 +0800, Edward Wijaya
[EMAIL PROTECTED] wrote:
use vars qw($f);
The above is good, but is now obsolete.
That is debatable.
Gather round, and listen to the story of a log handling utility
written in perl,
On Tue, 28 Sep 2004 15:26:08 -0400 (EDT), Chris Devers
[EMAIL PROTECTED] wrote:
On Tue, 28 Sep 2004, Errin Larsen wrote:
On Tue, 28 Sep 2004 18:51:12 +0800, Edward Wijaya
[EMAIL PROTECTED] wrote:
use vars qw($f);
The above is good, but is now obsolete.
That is debatable.
Edward Wijaya wrote:
Hi,
Hello,
Why my code below fail to open and
print the file contents
when I do:
perl mycode.pl -f filename
__BEGIN__
use strict;
use warnings;
use Getopt::Std;
use vars qw($f);
getopts('f:');
getopts( 'f:' ) creates the variable $opt_f and stores the following
Errin Larsen wrote:
So, what was the justification for changing 'use vars' to 'our'?
I don't know, but I suspect it's because our is a complement to my. Same
syntax (no silly qw() business), same lexical scoping, etc.
You're correct. our() should be used and 'use vars' should be considered
On Tue, 28 Sep 2004, Errin Larsen wrote:
On Tue, 28 Sep 2004 18:51:12 +0800, Edward Wijaya
[EMAIL PROTECTED] wrote:
use vars qw($f);
The above is good, but is now obsolete.
That is debatable.
Please, beginners, recognize the above word, *debatable*!! I disagree
with the
On Tue, 28 Sep 2004, Wiggins d Anconia wrote:
On Tue, 28 Sep 2004, Chris Devers wrote:
On Tue, 28 Sep 2004, Errin Larsen wrote:
On Tue, 28 Sep 2004 18:51:12 +0800, Edward Wijaya
[EMAIL PROTECTED] wrote:
use vars qw($f);
The above is good, but is now obsolete.