tail + count

2003-01-11 Thread Mrtlc
I wrote the following script as a windows tail + count function, but it's too slow if the input is huge, how can it be improved? if (!$ARGV[0]){ die("you've forgotten to enter the file name\n"); } if (!$ARGV[1]) { $n = 9; # output 10 rows by default } else { $n = $ARG

how to make die really dies on windows?

2002-12-31 Thread Mrtlc
I have a script gonnadie.pl ##gonnadie.pl do_sth die "blah blah"; gonnadie.pl is called by a DOS batch file x.bat REM - x.bat perl gonnadie.pl x.bat is called by y.bat REM - y.bat x.bat When y.bat is run, the OS treats x.bat ends sucessfully, how can I make y.bat dies when gonnadie.pl dies

DBI, Win32::ODBC, encrypted file, udl questions

2002-08-29 Thread mrtlc
I want to pull some data down from a Teradata database to a Win2k/NT server. I use DBI or Win32::ODBC, a system DSN (teradata1) is created. use DBI; use DBD::ODBC; my $dbh = DBI->connect("DBI:ODBC:teradata1", "uname", "moo"); ... or use Win32::ODBC; $data = new Win32::ODBC("DSN = teradata1; UID

Re: Microsoft Access/Running program as a service on Win2k

2002-04-09 Thread mrtlc
I think you need both DBI and DBD::ODBC. Timothy Johnson <[EMAIL PROTECTED]> wrote in message C0FD5BECE2F0C84EAA97D7300A500D5002581294@SMILEY">news:C0FD5BECE2F0C84EAA97D7300A500D5002581294@SMILEY... > > Oops. I think that was DBD, not DBI. > > -Original Message- > From: Timothy Johnson [