Getopt::Std issues

2002-08-02 Thread ccurtis
I'm not sure if this is a problem with Getopt::Std or if it's just me, but I'm having some issues getting this to cooperate: use Getopt::Std; my %OPT = (); getopt('dhnt:', \%OPT); and later... if (exists($OPT{'h'})) { ## print usage and exit... If I call my script with

Re: Getopt::Std issues

2002-08-02 Thread ccurtis
On Fri, Aug 02, 2002 at 01:32:52PM -0400, [EMAIL PROTECTED] wrote: I'm not sure if this is a problem with Getopt::Std or if it's just me, but I'm having some issues getting this to cooperate: use Getopt::Std; my %OPT = (); getopt('dhnt:', \%OPT); Oops, looks like I have to use getopts

Re: Reading from a bunch of files.

2002-07-15 Thread ccurtis
On Mon, Jul 15, 2002 at 11:23:52PM +0800, Connie Chan wrote: my @Files = ( . ); # List of file names here. my @record = ( ); my $pattern = whatever; foreach $file(@Files) {open FH, $file; while (FH) { push @record, $file if ($_ =~ /$pattern/ig) } close (FH)

Re: Newbie Stupid Question!

2002-07-15 Thread ccurtis
On Mon, Jul 15, 2002 at 01:35:15PM -0500, Akens, Anthony wrote: On an unrelated note, something that is an immense help to me when using or die is to put $! in the die statement, for example: or die Can't open documents: $!; The $! inserts the human readable error returned by the system,