File Handles as arguments...

2001-06-09 Thread Mike Breeze
Hi all, Firstly, this a great list. Thanks to those responsible for coming up with it and supporting it. I'm writing some subroutines that will require a filehandle to be passed in. I've been looking at a FAQ on perl.com (http://www.perl.com/pub/doc/FAQs/FAQ/oldfaq-html/Q5.25.html), which sugges

Re: File Handles as arguments...

2001-06-11 Thread Mike Breeze
-- Original Message -- From: "Evgeny Goldin (aka Genie)" <[EMAIL PROTECTED]> > >> CODE 3: >> printit(*Some_Handle); > >> CODE 4: >> printit(\*Some_Handle); > > >If you're choosing between those two - CODE 4 looks better as it passes >the reference to

Text file parsing - one chunk v char by char

2001-07-05 Thread Mike Breeze
Hi there, I'm writing some code that has to parse a text file containing a series of records. The records are a direct export from a third party DB and are delimited by the "¬" char (I hope that comes out on all your email clients but I guess it doesn't really matter. What bothers me is that the

Re: Text file parsing - one chunk v char by char

2001-07-05 Thread Mike Breeze
Very nice! I love Perl:) Cheers Ken, Breezy Ken wrote: > $/ = "¬"; > > Then while() will only bring in each record. > > - Original Message - > From: "Mike Breeze" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Thursday,

Insecure, dependant and tainted:(

2001-08-04 Thread Mike Breeze
Hi all, Can anyone see why the following code: # Name: updateReferrer # Usage: updateReferrer( $site, $referrer ); # Desc: Reads the referrer tally hash in from file, updates the count for # $referrer and then writes the hash back to file. # Return: n/a sub updateReferrer ($$) {

Re: Insecure, dependant and tainted:(

2001-08-04 Thread Mike Breeze
Secure, independent and untainted now - all thanks to me!:) The $site variable was actually passed in and I guess that could pose a security risk in that information passed in influences the directory structure. This is my first experience of Perl's security features - quite cool, as long as you

IE and HTTP_REFERER; and a Perl test

2001-08-22 Thread Mike Breeze
Hi all, My first question is a little off the beaten track. I'm writing some web counter software at the moment. Basically I use Javascript to embed the following into a html page: