Re: Zlib compression question

2002-07-13 Thread Shannon Murdoch
Seem to have stated my own solution. $outlog=gzopen($fn,"a"); specifies appendage to a file whereas $outlog=gzopen($fn,"wb"); specifies overwriting a file. Does anyone know how to READ a gzip file into an array? -Shannon > Hi all, > > I'm running a site with a lot of compressed text files c

Zlib compression question

2002-07-13 Thread Shannon Murdoch
Hi all, I'm running a site with a lot of compressed text files containing data for various clients. Some of these files get appended to (lets say, a log file perhaps). Is there some prevision to the Compress:Zlib module that lets you specify that you want to append to a file? (instead of needin

Re: Sorting files by date (in first line)

2002-07-08 Thread Shannon Murdoch
rticle [EMAIL PROTECTED], "Shannon Murdoch" <[EMAIL PROTECTED]> wrote: > Hi all, > > I have a list of 40 or so files that need to be sorted into an array by > article date (found in first line of each file in the form DD-MM-). > I can't figure out how to g

Sorting files by date (in first line)

2002-07-08 Thread Shannon Murdoch
Hi all, I have a list of 40 or so files that need to be sorted into an array by article date (found in first line of each file in the form DD-MM-). I can't figure out how to go about it successfully... Can anyone help me out please?? Thanks in advance! Current method is as follows: use T

Re: Auto-initialising a client-side download

2001-10-31 Thread Shannon Murdoch
, even if the PC hasn't got MS Excel. Thanks for the Perl-related suggestions RaFaL. > From: [EMAIL PROTECTED] (Rafal Pocztarski) > Newsgroups: perl.beginners.cgi > Date: Tue, 30 Oct 2001 14:33:37 +0100 > To: [EMAIL PROTECTED] > Subject: Re: Auto-initialising a client-side down

Re: Auto-initialising a client-side download

2001-10-31 Thread Shannon Murdoch
Unless there is some way to ZIP the file just before sending, it would be impractical for my particular situation Stephan. The files are updated and written to constantly on the server by the users who 'own them' so to speak. They are data files that are used by doctorate students for questionnai

Re: Free Mac Private Perl server

2001-10-31 Thread Shannon Murdoch
ECTED] > Subject: Re: Free Mac Private Perl server > > In article <[EMAIL PROTECTED]>, > [EMAIL PROTECTED] (Shannon Murdoch) wrote: > >> Couldn't find the AFAIK version of MacPerl (CPAN was down, as usual) using >> the www.macperl.com link. >> >&g

Re: Auto-initialising a client-side download

2001-10-30 Thread Shannon Murdoch
} close(OUT); > From: [EMAIL PROTECTED] (Rafal Pocztarski) > Newsgroups: perl.beginners.cgi > Date: Mon, 29 Oct 2001 13:58:47 +0100 > To: [EMAIL PROTECTED] > Subject: Re: Auto-initialising a client-side download > > Shannon Murdoch wrote: >> >> Oh, I only just fo

Re: Auto-initialising a client-side download

2001-10-30 Thread Shannon Murdoch
> Newsgroups: perl.beginners.cgi > Date: Mon, 29 Oct 2001 13:58:47 +0100 > To: [EMAIL PROTECTED] > Subject: Re: Auto-initialising a client-side download > > Shannon Murdoch wrote: >> >> Oh, I only just found there was more beyond the first quoted block of text! >> I'll

Re: Printing Hash Keys

2001-10-25 Thread Shannon Murdoch
the key to the submitted data hash. All your help has been invaluable so far- I couldn't have come this far without such great help. Thank you Brett and others. I'll be sure to show you the entire site when it is finished and on the web. -Shannon Murdoch > > On Thu, 25 Oct 2001,

Re: Auto-initialising a client-side download

2001-10-25 Thread Shannon Murdoch
Oh, I only just found there was more beyond the first quoted block of text! I'll look in to it now. Thanks Rafal! > From: [EMAIL PROTECTED] (Rafal Pocztarski) > Newsgroups: perl.beginners.cgi > Date: Thu, 25 Oct 2001 13:20:43 +0200 > To: [EMAIL PROTECTED] > Subject: Re: Auto-initialising a clien

Re: Printing Hash Keys

2001-10-25 Thread Shannon Murdoch
the key to the submitted data hash. All your help has been invaluable so far- I couldn't have come this far without such great help. Thank you Brett and others. I'll be sure to show you the entire site when it is finished and on the web. -Shannon Murdoch > From: [EMAIL PROTECTED] (

Re: Auto-initialising a client-side download

2001-10-25 Thread Shannon Murdoch
Oh, I only just found there was more beyond the first quoted block of text! I'll look in to it now. Thanks Rafal! > From: [EMAIL PROTECTED] (Rafal Pocztarski) > Newsgroups: perl.beginners.cgi > Date: Thu, 25 Oct 2001 13:20:43 +0200 > To: [EMAIL PROTECTED] > Subject: Re: Auto-initialising a clien

Re: Printing Hash Keys

2001-10-25 Thread Shannon Murdoch
Couldn't seem to locate it (using MacPerl) unfortunately. There is a few pods that came with it, but mostly I'm using The Perl CD Bookshelf by O'reilly & Associates for reference. It's on my PC system when I need it though. >> ... Perldoc (found out I can only use it under Windows, which >> I

Re: Printing Hash Keys

2001-10-25 Thread Shannon Murdoch
x27;t know enough about the CGI.pm's internal workings I guess. -Shannon > From: "Bradford Ritchie" <[EMAIL PROTECTED]> > Date: Wed, 24 Oct 2001 20:03:34 -0400 > To: "Shannon Murdoch" <[EMAIL PROTECTED]> > Subject: Re: Printing Hash Keys > >

Re: Printing Hash Keys

2001-10-25 Thread Shannon Murdoch
array? -Shannon > From: [EMAIL PROTECTED] (Rafal Pocztarski) > Newsgroups: perl.beginners.cgi > Date: Wed, 24 Oct 2001 16:04:19 +0200 > To: [EMAIL PROTECTED] > Subject: Re: Printing Hash Keys > > Shannon Murdoch wrote: >> >> What everyone has said so far is ways to lis

Re: Printing Hash Keys

2001-10-24 Thread Shannon Murdoch
CTED] (Rafal Pocztarski) > Newsgroups: perl.beginners.cgi > Date: Wed, 24 Oct 2001 16:04:19 +0200 > To: [EMAIL PROTECTED] > Subject: Re: Printing Hash Keys > > Shannon Murdoch wrote: >> >> What everyone has said so far is ways to list all the VALUES contained in a

Re: Auto-initialising a client-side download

2001-10-24 Thread Shannon Murdoch
;s filesystem and add them to autoexec script. It looks for > me more like an idea to invoke a save dialog in user's browser instead > of showing file content on the screen, when he clicks the link to a text > file. > > Shannon Murdoch wrote: > >>> I'm writin

Re: Printing Hash Keys

2001-10-24 Thread Shannon Murdoch
9:57:09 -0400 (EDT) > To: Shannon Murdoch <[EMAIL PROTECTED]> > Cc: <[EMAIL PROTECTED]> > Subject: Re: Printing Hash Keys > > On Wed, 24 Oct 2001, Shannon Murdoch wrote: > >>>> foreach (sort keys %params) { print "\t$params{$_}" } >>> >&

Re: Printing Hash Keys

2001-10-24 Thread Shannon Murdoch
Reply-To: [EMAIL PROTECTED] > Newsgroups: perl.beginners.cgi > Date: Wed, 24 Oct 2001 08:15:12 -0400 > To: Shannon Murdoch <[EMAIL PROTECTED]> > Cc: [EMAIL PROTECTED] > Subject: Re: Printing Hash Keys > > Shannon Murdoch wrote: >> >>> From: [EMAIL PROTE

Auto-initialising a client-side download

2001-10-24 Thread Shannon Murdoch
Hi all, I'm writing a script that will require a text file on my http server to be downloaded (*not viewed in browser window*) by the script's activator. Let's say the text file is called 'bobby.txt' and is located in the same directory as the cgi script. ( The full URL that will end up being u

Re: Printing Hash Keys

2001-10-23 Thread Shannon Murdoch
> From: [EMAIL PROTECTED] (Brett W. McCoy) > > On Wed, 24 Oct 2001, Shannon Murdoch wrote: > >> I know how to print the contents of a hash, but what if I wanted to print >> the keys themselves that the hash is called from (delimited by tabs)? >> >> This i

Printing Hash Keys

2001-10-23 Thread Shannon Murdoch
Hi all, I know how to print the contents of a hash, but what if I wanted to print the keys themselves that the hash is called from (delimited by tabs)? This is how I print the contents of a hash (Thanks to Brett W. McCoy): %params = qw( i01 4 i02 5 i03 2 ); foreach (sort keys %params) { print "

Re: Free Mac Private Perl server

2001-10-17 Thread Shannon Murdoch
>> Couldn't find the AFAIK version of MacPerl (CPAN was down, as usual) using >> the www.macperl.com link. > > No, no, AFAIK means "as far as I know". :) Haha sorry- never seen that abbreviated before - guess I don't belong here then... :) > >> Are you able to give me some direct binary link

Re: Free Mac Private Perl server

2001-10-17 Thread Shannon Murdoch
rsion of MacPerl (CPAN was down, as usual) using the www.macperl.com link. Are you able to give me some direct binary links at all? Sorry to be a hassle... Cheers, -Shannon Murdoch > And for Perl you need MacPerl AFAIK: > http://www.macperl.com/ > > but if you're using Mac OS X

Free Mac Private Perl server

2001-10-17 Thread Shannon Murdoch
Hi all, just thought I'd pick your brains regarding a possibly theoretical question (tell me if it's not!)... I've got a PC emulator on my Mac running WinNT, Apache and the latest version of Perl for web-testing my scripts while I'm offline. Is there a way I can web-test them natively using my M

Re: (simple) cgi.pm question

2001-10-17 Thread Shannon Murdoch
Thanks guys! You're 2 minutes of wisdom has brought my 100+ line script down to 20 or so =) Thanks for your continued support of this newsgroup and its users! -Shannon Murdoch > You could write something like this: > > print join "\t", @params{'q001'..&#

Re: (simple) cgi.pm question

2001-10-15 Thread Shannon Murdoch
So the script halves in size and now becomes: --- #!/usr/bin/perl -w use CGI qw(:standard); my $cgi = new CGI; my %params = $cgi->Vars; open(COUNTER,"entrycount.txt"); while(){ $entrynumber = $_; ###get previous entry number last; } close(COUNTER); op

Re: (simple) cgi.pm question

2001-10-15 Thread Shannon Murdoch
Thanks Brett, that's very handy to know! Cheers, -Shannon > From: "Brett W. McCoy" <[EMAIL PROTECTED]> > Date: Mon, 15 Oct 2001 23:53:56 -0400 (EDT) > To: Shannon Murdoch <[EMAIL PROTECTED]> > Cc: <[EMAIL PROTECTED]> > Subject: Re: (simple) c

(simple) cgi.pm question

2001-10-15 Thread Shannon Murdoch
d.txt"); #open the final file #write the tab-delimited results to it print OUTFILE "$entrynumber\t$q1_1\t$q1_2\t$q1_3\t$q1_4\t$q1_5\t$q1_6\t$q1_7\t$q1_8\t$q1_9 \t$q1_10\t$q1_11\t$q1_12\t$q1_13\t$q1_14\t$q1_15\t$q1_16\t$q1_17\t$q1_18\t$q 1_19\t$q1_20\t$q1_21\t$q1_22\t$q

Win32 & UNIX Webserver issue

2001-10-05 Thread Shannon Murdoch
Hi all, I've finished writing one of my longest scripts to date and uploaded it to a WindowsNT Apache webserver- works fine. On a Unix server (f2s.com), it doesn't run, and gives no clues as to why. Is there any common issues that I should be aware of in regards to Win32/unix compatibility in my

Re: problem

2001-10-05 Thread Shannon Murdoch
Don't know if this helps: It's from perl.daily.tips On to the tip: Anyone have seen code like print "http://$url/\";>$site (\"$title\")"; Now, it is quite annoying to read all those \'s, so you would think there is a better way. Well, there is! :-) The above line could be written as pr

MacPerl->WebCGI tip

2001-10-05 Thread Shannon Murdoch
. It took me six or seven rewrites of an 8 page script to figure this out! Oh well, I sorted out some minor bugs in the process =) -Shannon Murdoch -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Killing multiple ' ' spaces from a string/$variable

2001-10-02 Thread Shannon Murdoch
s (hello,how,are,you,I,am,fine) when in the array. Thanks Kevin, you're a champ. > From: [EMAIL PROTECTED] (Kevin Meltzer) > Reply-To: [EMAIL PROTECTED] > Newsgroups: perl.beginners.cgi > Date: Tue, 2 Oct 2001 20:09:50 -0400 > To: Shannon Murdoch <[EMAIL PROTECTED]> >

Killing multiple ' ' spaces from a string/$variable

2001-10-02 Thread Shannon Murdoch
Hi all, I'm trying to get this string (example): $all_codes = '4c1 4- 4c2 4-8b1 8g1'; in to an array (@codes), using it's whitespace as the delimiter. ie. @codes = split(/ /,$all_codes); but I keep getting extra whitespace elements picked up into the array...: '4c1,4-,4c2,4-, ,8b1,8g1'

Re: $variable manipulation question

2001-10-02 Thread Shannon Murdoch
PROTECTED]> > Subject: RE: $variable manipulation question > >> -Original Message- >> From: Shannon Murdoch [mailto:[EMAIL PROTECTED]] >> Sent: Tuesday, October 02, 2001 6:51 AM >> To: [EMAIL PROTECTED] >> Subject: Re: $variable manipulation question

Re: $variable manipulation question

2001-10-02 Thread Shannon Murdoch
:59 -0400 > To: [EMAIL PROTECTED] > Subject: Re: $variable manipulation question > > In article <[EMAIL PROTECTED]>, > [EMAIL PROTECTED] (Shannon Murdoch) wrote: > >> I'm trying to get a string (held in a variable) to have all it's characters >> spaced ap

Re: $variable manipulation question

2001-10-02 Thread Shannon Murdoch
; Organization: My Angel.com >> Newsgroups: perl.beginners.cgi >> Date: Tue, 2 Oct 2001 18:54:51 +0800 >> To: <[EMAIL PROTECTED]>, "Shannon Murdoch" >> <[EMAIL PROTECTED]> >> Subject: Re: $variable manipulation question >> >> Thats

Re: $variable manipulation question

2001-10-02 Thread Shannon Murdoch
I found a solution not long after using a loop of sorts. (and killed two birds with one stone, as my next step was to put each item (space delimited) into an array). I made a loop saying, 'as long as $input still has characters in it, put each one (one at a time) into the @front_chars array, then

$variable manipulation question

2001-10-02 Thread Shannon Murdoch
Hi all, I'm trying to get a string (held in a variable) to have all it's characters spaced apart by a ' ' space. ie. $input's content changes from '1234' to '1 2 3 4' Is there some way to do this? cheers, -Shannon -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mai

Re: Win32 Apache and Perl

2001-09-02 Thread Shannon Murdoch
shebang...! The plain unix flavor shebang works fine on my Win32 Apache now. #!/usr/bin/perl Thanks a million Gunther! -Shannon > From: Gunther Birznieks <[EMAIL PROTECTED]> > Date: Sun, 02 Sep 2001 07:25:31 +0800 > To: "Brett W. McCoy" <[EMAIL PROTECTED]>, Shannon Mur

Re: Win32 Apache and Perl

2001-09-02 Thread Shannon Murdoch
shebang...! The plain unix flavor shebang works fine on my Win32 Apache now. #!/usr/bin/perl Thanks a million Gunther! -Shannon > From: Gunther Birznieks <[EMAIL PROTECTED]> > Date: Sun, 02 Sep 2001 07:25:31 +0800 > To: "Brett W. McCoy" <[EMAIL PROTECTED]>, Shannon Mur

Re: Win32 Apache and Perl

2001-09-01 Thread Shannon Murdoch
Yes, Apache interprets the shebang line before running the script- the script needs to point to the OS-dependant path to Perl before it will run. -Shannon > I stand corrected then! Does Apache interpret the shebang line before > running the script? I've had problems with Apache *requiring* th

Re: Win32 Apache and Perl

2001-09-01 Thread Shannon Murdoch
shebang...!) The plain unix flavor shebang works fine on my Win32 Apache now. #!/usr/bin/perl Thanks a million Gunther! -Shannon > From: Gunther Birznieks <[EMAIL PROTECTED]> > Date: Sun, 02 Sep 2001 07:25:31 +0800 > To: "Brett W. McCoy" <[EMAIL PROTECTED]>, Shannon Mur

Win32 Apache and Perl

2001-09-01 Thread Shannon Murdoch
Hi all, I'm trying to set up a localhost Apache server to test my scripts on before launching on to the web, but am seeming always to need to put the win32 shebang (#!C:\perl\bin\perl.exe) at the start of scripts instead of the usual unix one (#!/usr/bin/perl) to make them work. Is there any way

Win32 Apache and Perl

2001-09-01 Thread Shannon Murdoch
Hi all, I'm trying to set up a localhost Apache server to test my scripts on before launching on to the web, but am seeming always to need to put the win32 shebang (#!C:\perl\bin\perl.exe) at the start of scripts instead of the usual unix one (#!/usr/bin/perl) to make them work. Is there any way