Re: cookies and web

2001-05-01 Thread C.J. Collier
Heya Jeff, You might consider HTTP::Cookies. You can use it with LWP by telling the useragent to use a new cookie object to grab cookies from the HTML headers. You'll get a lot more from perldoc HTTP::Cookies, but following is an example, Cheers, C.J. #!/usr/bin/perl -w use strict; u

RE: cookies and web

2001-05-01 Thread King, Jason
Jeff K.V. Bhavnanie writes .. >How do i go about accepting a cookie from a web login site? in a cookie jar >I use LWP to do a POST, but i can't login as the server >sends a cookie. Is there a generic Login perl script lines? > >Login to a web site, send username password, accept cookie >then th

RE: CGI Problem

2001-05-01 Thread J. Patrick Lanigan
Yeah, the CLI gave me the expected result. I am pretty stumped at this point. I have added everything to my httpd.conf that should be in there. And I am geting a different error than before, so I am confident that the file is found. Anyone have any other ideas? Thanks Jason, Patrick > jason kin

RE: how to ??

2001-05-01 Thread King, Jason
Daniel Choong writes .. >okie, this probably sounds very simple but i dunno how >to do it. i just learnt perl. i need some tips on how >to use a perl script to automate the updating of files >on multiple servers. i am trying to use ftp but i do >not know how to write the script to read the output

RE: CGI Problem

2001-05-01 Thread King, Jason
J. Patrick Lanigan writes .. >I tried them on th CLI first. I even su'ed to user nobody to >match the env of apache. and on the CLI - I presume that they outputted exactly what you expected .. ie. "Content-type: text/html Hello World! " it doesn't seem like a permissions error .. I presume

cookies and web

2001-05-01 Thread Jeff K.V. Bhavnanie
Hi, How do i go about accepting a cookie from a web login site? I use LWP to do a POST, but i can't login as the server sends a cookie. Is there a generic Login perl script lines? Login to a web site, send username password, accept cookie then the rest of the POST forms send that cookie back?

RE: CGI Problem

2001-05-01 Thread J. Patrick Lanigan
I tried them on th CLI first. I even su'ed to user nobody to match the env of apache. > King, Jason wrote: > > J. Patrick Lanigan writes .. > > > >I am getting an "Internal Server Error" returned to my > >browser. The error > >log shows the following: > > > >"[Wed May 2 00:04:39 2001] [error] [c

RE: CGI Problem

2001-05-01 Thread King, Jason
J. Patrick Lanigan writes .. >I am getting an "Internal Server Error" returned to my >browser. The error >log shows the following: > >"[Wed May 2 00:04:39 2001] [error] [client 192.168.0.10] >Premature end of >script headers: /path/to/filename" your scripts are very simple which would sugge

how to ??

2001-05-01 Thread Daniel Choong
okie, this probably sounds very simple but i dunno how to do it. i just learnt perl. i need some tips on how to use a perl script to automate the updating of files on multiple servers. i am trying to use ftp but i do not know how to write the script to read the output from ftp, then send the use

CGI Problem

2001-05-01 Thread J. Patrick Lanigan
I am getting an "Internal Server Error" returned to my browser. The error log shows the following: "[Wed May 2 00:04:39 2001] [error] [client 192.168.0.10] Premature end of script headers: /path/to/filename" I have set the directory and file to 755 and the correct ownership. I have tried a coup

RE: RegEx Prob WAS: Problem with reading string

2001-05-01 Thread J. Patrick Lanigan
I just keep learning. This list is making learning much easier. Thanks to Dan and Jason, Patrick > you need the global modifier .. what you're trying to do is do the current > match globally throughout the whole string (not zero or more) > > $mystring =~ s/\'/\\'/g;

RE: test if a directory exists if it does delete it else print di rectory does not exists

2001-05-01 Thread King, Jason
I wrote .. >so .. your code could probably have looked something like this >(using the wonderful File::Path module) > > #!perl -w > use strict; > > use File::Path 'rmtree'; > > open DIRS, 'c:/admin/removedir.txt' or die "Bad open: $!"; > chomp( my @dirs = ); > > rmtree( \@dirs); > > __END

RE: test if a directory exists if it does delete it else print directory does not exists

2001-05-01 Thread King, Jason
Peter Lemus writes .. >I need to delete some directories, specified in >removedir.txt, I'll like to check whether the file >exists or not, if it doesn't I need to print file has >been deleted. this is what I've done so far. ok .. line by line (and excuse the pedantry) >use file::spec; >use wi

Re: Problem with reading string

2001-05-01 Thread Dan Brown
Use the 'g' switch so the pattern match is $mystring =~ s/\'/\\'/g; This 'g' says do it for all occurrences (I remember it by thinking of it as the 'g' in 'globally'). Dan "J. Patrick Lanigan" wrote: > > I was using: > > $mystring =~ s/\'/\\'/; > > ...to replace ' with \' in

test if a directory exists if it does delete it else print directory does not exists

2001-05-01 Thread Peter Lemus
HI Folks, I need to delete some directories, specified in removedir.txt, I'll like to check whether the file exists or not, if it doesn't I need to print file has been deleted. this is what I've done so far. use file::spec; use win32; chdir ("c://admin"); open (FILE1, 'c://admin//remove.txt') |

RE: RegEx Prob WAS: Problem with reading string

2001-05-01 Thread King, Jason
J. Patrick Lanigan writes .. >> I was using: >> >> $mystring =~ s/\'/\\'/; >> >> ...to replace ' with \' in $mystring. It was working find I >> thought, until I >> encountered a string with multiple apostrophies. How do I replace >> 0 or more? >> >> Ex: >> >> "No More 'I Love You's'" >

RE: running gzip with the system function

2001-05-01 Thread King, Jason
lance turner writes .. >Thanks Jason for your reply. > >I tried using an absolute path for gzip, but I'm getting the >same error. > >I don't understand why I can run gzip from the shell but can't run it >through perl. I'm able to run tar and other programs using the system >function but not g

RE: Perl and NT

2001-05-01 Thread King, Jason
Matt Blatchley writes .. >Does anyone know of a way to use perl and CGI to have the following: > >html page w/ form to get stdin from the user for username and >password.(basic), >pass the variables to the perl script which then modifies permissions >for a specific folder on NT and allows the u

RE: finding common records between two files

2001-05-01 Thread King, Jason
Mike Stussie writes .. >I'm a newbie to perl and trying to solve a problem.. Here is what I'm >trying to do: > >read thru flat file 'A' that looks something like this:(fields >delimited by >'::') >BCSNDTJN::Joe User::1 N. >Main::Anytown::MO::None::None::None::Unknown::[EMAIL PROTECTED] > >and f

RE: Question on optimizing this sub (help!)

2001-05-01 Thread King, Jason
Shawn writes .. >Can someone look at a subroutine for me? Specifically, after >this (at bottom of email) subroutine runs, it increases my >RSS by 6 megs, and shouldn't do that. (here it has indexed >133798 files) this is normal Perl behaviour - welcome to an interpreted language .. check out th

RE: Using Email

2001-05-01 Thread King, Jason
Phillip Bruce writes .. > Anyone with experience in having perl call up mailx and > at the same time have the body of the messages sent along > with attachment. using mailx is almost certainly not the ideal solution for your system .. there are a number of Perl modules that deal with sending

RegEx Prob WAS: Problem with reading string

2001-05-01 Thread J. Patrick Lanigan
Opps, I forgot to change the subject. I think I need to get outside and get some fresh air. > I was using: > > $mystring =~ s/\'/\\'/; > > ...to replace ' with \' in $mystring. It was working find I > thought, until I > encountered a string with multiple apostrophies. How do I replace > 0 or

RE: Problem with reading string

2001-05-01 Thread J. Patrick Lanigan
I was using: $mystring =~ s/\'/\\'/; ...to replace ' with \' in $mystring. It was working find I thought, until I encountered a string with multiple apostrophies. How do I replace 0 or more? Ex: "No More 'I Love You's'" ...should become: "No More \'I Love You\'s\'" I

Re: writing an array to file

2001-05-01 Thread Sean O'Leary
At 12:28 PM 5/1/2001, you wrote: >sub wanted { > @FILES = (); > if ( $File::Find::name =~ /_boot\.js$/ ) > { >push @FILES, "$File::Find::name\n"; > } > > print (@FILES); > > open(BOOT_FILES,">boot_files.txt"); >

Re: writing an array to file

2001-05-01 Thread Paul
--- Kaustav Bhattacharya <[EMAIL PROTECTED]> wrote: > I have an array populated with data, I want to dump its content to > file but > my following code is not writing any data out! HELP: > > sub wanted { > @FILES = (); > if ( $File::Find::name =~ /_boot\.js$/ ) > { >

Re: IF statements

2001-05-01 Thread Casey West
On Tue, May 01, 2001 at 01:22:59PM -0700, Paul wrote: : : --- Kaustav Bhattacharya <[EMAIL PROTECTED]> wrote: : > Mark, : > I only recently started coding in PERL so don't take the following as : > official. : > : > There is no CASE statement in PERL. Instead you use something called : > SWITCH.

[OT]RE: IF statements (the ugliest SWITCH! =o)

2001-05-01 Thread Paul
--- Kaustav Bhattacharya <[EMAIL PROTECTED]> wrote: > Mark, > I only recently started coding in PERL so don't take the following as > official. > > There is no CASE statement in PERL. Instead you use something called > SWITCH. Another trick, possibly not for beginners but sometimes handy: my %

RE: IF statements

2001-05-01 Thread Paul
--- Kaustav Bhattacharya <[EMAIL PROTECTED]> wrote: > Mark, > I only recently started coding in PERL so don't take the following as > official. > > There is no CASE statement in PERL. Instead you use something called > SWITCH. > The O'Reilly book has an example of how to use the SWITCH statemen

Re: Strange chop behaviour

2001-05-01 Thread Paul
--- Francis Henry <[EMAIL PROTECTED]> wrote: > Craig, > > I'm a newbie too, but isn't the function "chomp"? chomp is the one Craig seems to need, but there's also a chop. chop() alsways knock a character off; chomp only pops input record seperators (like newline, or CRLF, depending on what the

Re: Hash of Arrays Question

2001-05-01 Thread Paul
--- "J. Patrick Lanigan" <[EMAIL PROTECTED]> wrote: > I haven't quite sorted out the more complex data structure in perl > yet. Anyhow, I need to take the following hash of arrays... > > my %tracks = (); > > push @{$tracks{$filename}}, > $_, # tracks.fi

RE: open file, find lines and print to a second file....

2001-05-01 Thread Paul
--- "McCormick, Rob E" <[EMAIL PROTECTED]> wrote: > > print RESULT grep { ! /_vti_cnf/ } ; > > # so that could be read as print to the output filehandle the result > of the input file handle filtered by grep. Exactly, and because grep is a list context, the one statement prints the entire s

Re: Is there an ODBC module in perl ?

2001-05-01 Thread Casey West
On Mon, Apr 09, 2001 at 07:21:24PM -, Perl Programmer wrote: : Is there an ODBC module in perl ? Yes, search for 'ODBC' at http://search.cpan.org/ If you are using windows as your client operating system, and have ActiveStat Perl installed, an ODBC driver has already been installed by defaul

RE: running gzip with the system functiou.qtontent-Type: text/plain; charset="us-ascii" ; format="flowed"

2001-05-01 Thread lance turner
Thanks Jason for your reply. I tried using an absolute path for gzip, but I'm getting the same error. I don't understand why I can run gzip from the shell but can't run it through perl. I'm able to run tar and other programs using the system function but not gzip. I'm thinking that I should t

Is there an ODBC module in perl ?

2001-05-01 Thread Perl Programmer
Is there an ODBC module in perl ? Thanks

Perl and NT

2001-05-01 Thread Matt Blatchley
Does anyone know of a way to use perl and CGI to have the following: html page w/ form to get stdin from the user for username and password.(basic), pass the variables to the perl script which then modifies permissions for a specific folder on NT and allows the user to then have access to a parti

Re: Strange chop behaviour

2001-05-01 Thread Craig Moynes/Markham/IBM
- Craig Moynes Internship Student netCC Development IBM Global Services, Canada Tel: (905) 316-3486 [EMAIL PROTECTED]

Re: Strange chop behaviour

2001-05-01 Thread Stephen P. Potter
Lightning flashed, thunder crashed and "Craig Moynes/Markham/IBM" <[EMAIL PROTECTED] bm.com> whispered: | open ( ERR, "; You are mixing things here you don't want to mix. This should just be: while ($in = ) { You *can* mix these, but there is no real reason to. Especially not in your sample c

Re: writing an array to file

2001-05-01 Thread Stephen P. Potter
Lightning flashed, thunder crashed and "Kaustav Bhattacharya" whispered: | open(BOOT_FILES,">boot_files.txt"); | print BOOT_FILES @FILES; | close BOOT_FILES; You should always check the return of open and close... open BOOT_FILES, ">boot_files.txt" or die "Can't open boot_file

Re: Strange chop behaviour

2001-05-01 Thread Stephen P. Potter
Lightning flashed, thunder crashed and "Collin Rogowski" <[EMAIL PROTECTED]> w hispered: | They exist both. | chop removes the last character. | chomp removes the last character if it's newline. Let's get this straight and correct. chomp removes the input record separator ($/). This may or may

finding common records between two files

2001-05-01 Thread Stussie, Mike
Hi all, I'm a newbie to perl and trying to solve a problem.. Here is what I'm trying to do: read thru flat file 'A' that looks something like this:(fields delimited by '::') BCSNDTJN::Joe User::1 N. Main::Anytown::MO::None::None::None::Unknown::[EMAIL PROTECTED] and find any duplicates based o

Re: Outputting content to the web

2001-05-01 Thread Dale Owens
I feel really stupid now. Yes, I have been forgetting the leading / on the path to perl. After using #!/usr/bin/perl at the top of the script it worked fine. I want to add that I appreciate all the replies to my question. I have used the internet for a lot of years and have belonged to many ma

Question on optimizing this sub (help!)

2001-05-01 Thread Shawn
Can someone look at a subroutine for me? Specifically, after this (at bottom of email) subroutine runs, it increases my RSS by 6 megs, and shouldn't do that. (here it has indexed 133798 files) This is the program before the checkstuff subroutine runs: PID USER PRI NI SIZE RSS SHARE STAT

writing an array to file

2001-05-01 Thread Kaustav Bhattacharya
I have an array populated with data, I want to dump its content to file but my following code is not writing any data out! HELP: sub wanted { @FILES = (); if ( $File::Find::name =~ /_boot\.js$/ ) { push @FILES, "$File::Find::name\n";

Re: open file, find lines and print to a second file....

2001-05-01 Thread Gil Tucker [ateliermobile]
hello world - Original Message - From: McCormick, Rob E <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, April 30, 2001 11:10 PM Subject: open file, find lines and print to a second file > gang, > > # problem: open a file > # find lines that meet a condition, p

RE: Hash of Arrays Question

2001-05-01 Thread J. Patrick Lanigan
Thank you so much for your help Gary and Jason. I tried the following and it works perfectly. Patrick #!c:/perl/bin/perl -w use strict; my %tracks=(); # create empty hash $tracks{'test'}->{artist}='test_artist'; $tracks{'test'}->{title}='test_title'; $tracks{'test2'}->{artist}='test_artist2'; $

Re: Outputting content to the web

2001-05-01 Thread Steve Neu
Mr. Owens, I find that the best way to write CGI scripts is to write them and run them on the command line. Then, when I know that they run without errors, I put them on my web server. If you do this, you can also specify... #!/usr/bin/perl -w (with the -w on the end) to get

RE: Hash of Arrays Question

2001-05-01 Thread J. Patrick Lanigan
Opps, forgot to change the variable name. Ah the power of cut and paste... for my $row ( keys %tracks ) { $artist = $tracks{$row}->{artist}; $title = $tracks{$row}->{title}; } > I wrote: > > Excellent! Thanks! So, when I need to iterate through the hash of > hashes and > wor

Re: Outputting content to the web

2001-05-01 Thread Gary Stainburn
Hi Dale, When this script fails, it's usually a server configuration problem, which is not really on-topic here, but. 1) what do you mean by full path? bear in mind that the path you specify in the URL will get munged by the web server. 2) what error does the browser show you? permissions, fi

RE: Hash of Arrays Question

2001-05-01 Thread J. Patrick Lanigan
Excellent! Thanks! So, when I need to iterate through the hash of hashes and work on the data would I do this: for my $row ( keys %tracks ) { $artist = $tracks{$fname}->{artist}; $title = $tracks{$fname}->{title}; } Thanks again for the pointer, Patrick > Gary Stainburn wrote:

Re: Outputting content to the web

2001-05-01 Thread Timothy Kimball
: #!usr/bin/perl Shouldn't this be #!/usr/bin/perl -- tdk

Re: Outputting content to the web

2001-05-01 Thread John Joseph Trammell
On Tue, May 01, 2001 at 11:28:02AM -0400, Dale Owens wrote: > I am completely new to perl and this question may seem really lame, > but I can't get the most basic script to work. I am trying to run > this on my web host's server: > > #!usr/bin/perl > > print "Content-type: text/html\n\n"; > pri

Re: IF statements

2001-05-01 Thread Stephen P. Potter
There isn't a switch statement either. There's a way to make something that looks similar to a switch, but it isn't a builtin control structure. -spp Lightning flashed, thunder crashed and "Kaustav Bhattacharya" whispered: | Mark, | I only recently started coding in PERL so don't take the foll

Re: IF statements

2001-05-01 Thread Stephen P. Potter
Lightning flashed, thunder crashed and Mark Martin <[EMAIL PROTECTED]> whisper ed: | What I have is this: | | if ($variable == 02){ | print OUT1 "$variable"; | $lines1 ++; | } elsif($variable == 03){ | print OUT1 "$variable\n"; | $lines2 ++; | } elsif($variable == "08"){

Re: IF statements

2001-05-01 Thread Timothy Kimball
: I think what I need is something called a case. but I can't find the syntax : anywhere. Perl doesn't have an official case (that is, switch) statement, but there is a Switch.pm module available on CPAN. Here's the synopsis from its manpage: use Switch; switch ($val) {

Outputting content to the web

2001-05-01 Thread Dale Owens
Hello, I am completely new to perl and this question may seem really lame, but I can't get the most basic script to work. I am trying to run this on my web host's server: #!usr/bin/perl print "Content-type: text/html\n\n"; print "Hello World!\n"; I then try to access the script by providing

Re: traversing dir tree and reading in files

2001-05-01 Thread Craig Moynes/Markham/IBM
Wanted is where you want to change this. Within the function place a regular expression or file-test ...anything that will give you a true/false answer that you can use. To get a list of executable files you would change >sub wanted { > print "$File::Find::name\n"; >} to: sub wanted

Re: Hash of Arrays Question

2001-05-01 Thread Gary Stainburn
Surely, a hash of hashes would be better then. my %tracks=(); # create empty hash Then to populate the data you do something like: $tracks{$fname}->{artist}=$artist; $tracls{$fname}->{title}=$title; Gary On Tuesday 01 May 2001 4:08 pm, J. Patrick Lanigan wrote: > Overall what I am trying to

Re: IF statements

2001-05-01 Thread Gary Stainburn
Hi Mark, Try this: switch:for ($variable) { #put $variable into $_ (/02/ || /03/ || /08/) && do { print OUT1 "$variable\n"; $lines1++; last; } ; (/79/ || /93/ || /99/) && do { print OUT3 "$variable\n"; $lines3++; last; } ; } Using this code, if the bit be

RE: IF statements

2001-05-01 Thread Kaustav Bhattacharya
Mark, I only recently started coding in PERL so don't take the following as official. There is no CASE statement in PERL. Instead you use something called SWITCH. The O'Reilly book has an example of how to use the SWITCH statement. Kaustav > -Original Message- > From: Mark Martin [mail

RE: Hash of Arrays Question

2001-05-01 Thread J. Patrick Lanigan
Overall what I am trying to accomplish is to loop through a bunch of mp3 files and extract the ID3 Tag Info into a hash (%tracks) for which each key references the filename, filepath, artist, album, tracknum, title, genre for one file. Once I have %tracks populated I need to iterate through it and

IF statements

2001-05-01 Thread Mark Martin
What I have is this: if ($variable == 02){ print OUT1 "$variable"; $lines1 ++; } elsif($variable == 03){ print OUT1 "$variable\n"; $lines2 ++; } elsif($variable == "08"){ print OUT1 "$variable\n"; $lines2 ++; } elsif($variable == 79){ pr

traversing dir tree and reading in files

2001-05-01 Thread Kaustav Bhattacharya
been trying to work out how to get PERL to traverse a given directory tree looking for all files with the string _boot.js in the file name. then I want to read each file and find all lines which start with the string "sWinReg" and copy them in to an array with each line being places in a seperate

Re: Problem with reading string

2001-05-01 Thread Greg Meckes
In your statements: print "@zin[$i] \n\r"; You should use: print "$zin[$i] \n\r"; And: > $ta = @zin[6]; > $tb = @zin[7]; > $tc = @zin[8]; > $td = @zin[9]; should be: > $ta = $zin[6]; > $tb = $zin[7]; > $tc = $zin[8]; > $td = $zin[9]; And: if (@zin[$t] = /212.104.202.50/g) { Should be: if ($z

Re: Strange chop behaviour

2001-05-01 Thread Collin Rogowski
They exist both. chop removes the last character. chomp removes the last character if it's newline. To the original problem: I had a similar problem once. Maybe your file has DOS-Newlines which are to characters (\r\n). If you chop, you keep \r at the end which could mess around with printing it

Re: Strange chop behaviour

2001-05-01 Thread Greg Meckes
chomp removes only the newline (what you want I think) and chop removes the last character #instead of chop $in; #Try: chomp $in; Greg __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/

Re: Problem with reading string

2001-05-01 Thread Collin Rogowski
I didn't quite get what your problem was. Can you elaborate on that? There are a couple of newbie problems in your script: > ## > #!/usr/bin/perl You should say: !/usr/bin/perl -w This turns on warnings (which is very helpful

Using Email

2001-05-01 Thread Phillip Bruce
Hi, Anyone with experience in having perl call up mailx and at the same time have the body of the messages sent along with attachment. -- *** Phillip B. Bruce *** *** http://pbbruce.home.minds

Re: Strange chop behaviour

2001-05-01 Thread Francis Henry
Craig, I'm a newbie too, but isn't the function "chomp"? Francis Craig Moynes/Markham/IBM wrote: > A little background. I am running an scp process within a perl script and > redirecting the error to a file (scp_err). I then read in the lines of > this file and attempt to place them in an e

Strange chop behaviour

2001-05-01 Thread Craig Moynes/Markham/IBM
A little background. I am running an scp process within a perl script and redirecting the error to a file (scp_err). I then read in the lines of this file and attempt to place them in an error string to log to syslog. Code Sample: #!/usr/bin/perl -w open ( ERR, "; chop $in; pr

Re: Got a project for Perl but need some help

2001-05-01 Thread Kenny Gatdula
Hi, You may find the MacOSX list helpful. Here's the article announcing the list. http://use.perl.org/article.pl?sid=01/03/29/1452216&mode=thread&threshold= send a message to subscribe at [EMAIL PROTECTED] At 05:32 AM 5/1/2001 -0400, you wrote: >Hey guys, > >Thanks so much for your help. The s

Problem with reading string

2001-05-01 Thread jose
Hi, I have a small problem, I'm trying to do the following. I'm using WOTS to scan logfiles, and when it gets an error from our name server, it has to cut the error message in pieces separated by a space. And has to compare it to the if statements. After that it has to copy a few pieces to mak

RE: Date stamping files

2001-05-01 Thread Grant McLean
You probably want to use Perl's built in 'localtime' function rather than system("date"). Here's an example: my($day, $month, $year) = (localtime())[3,4,5]; my $a = sprintf("%04u-%02u-%02u", $year + 1900, $month + 1, $day); Here's a walkthrough ... You can get the current time using time(

Re: Got a project for Perl but need some help

2001-05-01 Thread Curtis Michelson
Hey guys, Thanks so much for your help. The supplied code was excellent. You Perl people are alright! :-) In answer to Johnathan Kupferer's question at to my computing platform, I'm actually working on a Mac g4 running Mac OS X and am very interested in testing out its Perl programming capabi

Date stamping files

2001-05-01 Thread Mark Martin
Does anybody know how to clean up the system time : Tue May 1 10:18:32 BST 2001 or select only part of it to give a more managable date format that can be used to stamp an output file from a program : $a = system ("date"); # OR A TRUNCATED VERSION # OR CLEAN IT UP HERE ??? $b = "filenam

RE: Removing an item from a list

2001-05-01 Thread King, Jason
David Kalnins writes .. >I was wondering if it was possible to remove an item from a list whilst >one is repeating over it with a foreach statement. For example, I was >hoping that the following code fragment would do this - but instead it >does exactly what I told it to do :) That is it leaves t

RE: Hash of Arrays Question

2001-05-01 Thread King, Jason
J. Patrick Lanigan writes .. >I haven't quite sorted out the more complex data structure in perl yet. >Anyhow, I need to take the following hash of arrays... you have some very confusing code there .. so let's do it one bit at a time >my %tracks = (); create a hash called tracks with zero e

Removing an item from a list

2001-05-01 Thread David_Kalnins
Hi all, I was wondering if it was possible to remove an item from a list whilst one is repeating over it with a foreach statement. For example, I was hoping that the following code fragment would do this - but instead it does exactly what I told it to do :) That is it leaves the item there but wi

Hash of Arrays Question

2001-05-01 Thread J. Patrick Lanigan
I haven't quite sorted out the more complex data structure in perl yet. Anyhow, I need to take the following hash of arrays... my %tracks = (); push @{$tracks{$filename}}, $_, # tracks.filename

RE: flock for win32

2001-05-01 Thread King, Jason
RDWest writes .. >i just joined the list. i've been fooling with perl scripts for a >few months now. just installing and editing html output mainly... now >i'm studying a coupkle books to write my own (i hope) > >question: i've seen a couple post in some forums about creating a temp >file for