Re: Complex question about GD::Graph

2001-11-13 Thread Peter Scott
At 03:12 PM 11/14/01 +1030, Daniel Falkenberg wrote: >Hey all, > >I have some user details that I want placed in this graph. Probem is my >Perl skills arn't all that good. Could some one give me some ideas with >the following? > >I have a hash here (%users) the Key here is their static IP addres

Re: Updating a hash using a refernece?

2001-11-13 Thread Christopher Solomon
On Tue, 13 Nov 2001, AMORE,JUAN (HP-Roseville,ex1) wrote: > How do I update the value pointed to by key "PAGER" from more to pg. > when using a reference only to the hash element for key "PAGER". > > > %Unix= ("SHELL" => "/bin/csh", >"PAGER" => "more", >"DB" => "mysql"); > > print

Updating a hash using a refernece?

2001-11-13 Thread AMORE,JUAN (HP-Roseville,ex1)
How do I update the value pointed to by key "PAGER" from more to pg. when using a reference only to the hash element for key "PAGER". %Unix= ("SHELL" => "/bin/csh", "PAGER" => "more", "DB" => "mysql"); print "Value: ", $unix{PAGER}; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For

Complex question about GD::Graph

2001-11-13 Thread Daniel Falkenberg
Hey all, I have some user details that I want placed in this graph. Probem is my Perl skills arn't all that good. Could some one give me some ideas with the following? I have a hash here (%users) the Key here is their static IP address. The value is just some data. Now the problem I am having

Re: expanding a pattern

2001-11-13 Thread John W. Krahn
Daniel Kidger wrote: > > I have a pattern like >$hosts = "fred[1,3-7,9-22]" > > Is there a simple way to generate an expanded list like: >fred1 fred3 fred4 fred5 ... > etc. Well, I don't know how simple you consider this: my $hosts = "fred[1,3-7,9-22]"; my ( $name, $list ) = $hosts =~

Re: greetings and salutations all

2001-11-13 Thread victor
Check out CGI.pm, and one more thing, make sure your html form has the ENCTYPE set to multipart/form-data. Tor. patrick wrote: > hello. > i'm a perl beginner. > > you know that bit in html ? > well i need to make my website upload files > and i only have cgi functionallity > > so i'll be doing

Learning Packages:

2001-11-13 Thread AMORE,JUAN (HP-Roseville,ex1)
Learning Packages: Do's anyone know how to create a package in a filename called StringPrint.pm. I need to include in the Perl module a subroutine, called print_str, that prints a string passed to the subroutine defined by the module. JA -- To unsubscribe, e-mail: [EMAIL PROTECTED] For addi

RE: Off-Topic (200%) - Where are you from?

2001-11-13 Thread Dianne Van Dulken
(And just when you thought the thread was dead...) I'm in Sydney, Australia. Cheers Di -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

greetings and salutations all

2001-11-13 Thread patrick
hello. i'm a perl beginner. you know that bit in html ? well i need to make my website upload files and i only have cgi functionallity so i'll be doing it with perl. help. i suspect it's a module i'm looking for. but there are so many to choose from -- p a t r i c k d u n i g a ng r a

Re: Split a line with Mutiple data type/lengths

2001-11-13 Thread John W. Krahn
Matt Richter wrote: > > I'm trying to split a line from a PIX Firewall log file and put it into > an array. The log entries look like: > > Nov 13 07:28:55 10.0.0.3 %PIX-4-400025: IDS:2154 ICMP ping of death from > 123.123.123.123 to 124.124.124.124 on interface outside > > Here is the code i've

Re: Trying to use the => notation to print the values from this hash

2001-11-13 Thread Chris Ball
On Wed, 2001-11-14 at 03:57, AMORE,JUAN (HP-Roseville,ex1) wrote: > %Unix= ("SHELL" => "/bin/csh", >"PAGER" => "more", >"DB" => "mysql"); > > print "Value: ,=> $unix{SHELL}\n"; The => in the last line is not necessary: print "Value: ", $unix{"SHELL"}\n"; will DWYM. As a side poin

Dereference question:

2001-11-13 Thread AMORE,JUAN (HP-Roseville,ex1)
Hello Do's anyone know how to create an array slice containing 2 elements and dereference to a @newarray I'm just starting to learn how to deference but would like a code example Thanks! JA -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Trying to use the => notation to print the values from this hash

2001-11-13 Thread AMORE,JUAN (HP-Roseville,ex1)
Hello Perl Gurus, I'm trying to print anyone of these values using the => notation. I believe I can use => but not so sure how to use it. Can someone give me an example,...I tried different ways but have exhausted all means. Any hints:) Many Thanks! %Unix= ("SHELL" => "/bin/csh", "PAGER"

SUMMARY: Data structure for handling Binary Data

2001-11-13 Thread Jason Ostrom
Hello Perl gurus, I thought I would post a summary of what I found on this question I asked the other day. The original question was how to send a binary stream of data across a socket from the TCP client end. How to use pack() and syswrite() were some of my questions. Well I did end up using

Re: Off-Topic (200%) - Where are you from?

2001-11-13 Thread Tim McClelland
Melbourne - Australia Raining a-lot but getting Warmer as well !! ** This email message and any files transmitted with it are confidential and intended solely for the use of addressed recipient(s). If you have received this

RE: Off-Topic (200%) - Where are you from?

2001-11-13 Thread Webster, Murray
Adelaide; South Australia - fine and getting warmer. Murray Webster DBA for EDS Australia -Original Message- From: Michael Fowler [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 14 November 2001 7:45 To: Elliott, Don (Police) Cc: '[EMAIL PROTECTED]' Subject: Re: Off-Topic (200%) - Where are

RE: What was your first PERL script (was Off-Topic (200%) - Where are you from?)

2001-11-13 Thread Dave Turner
Mine just got completed after about 6 months of on and off work. It is a CGI app to allow a merchant to update items for sale via a web page. Adds them on one side, and check boxes allow you to choose which to get rid of on the other side. It writes items to a small file -- it's too small a nu

RE: Split a line with Mutiple data type/lengths

2001-11-13 Thread Wagner-David
Here is a start. I have placed the first 6 items in the array and placed the rest in the seventh item. From here you should be able to determine if a protocol exists or start of derscription then you should be able to generate a simple regex to get the description plus the other data f

Split a line with Mutiple data type/lengths

2001-11-13 Thread Matt Richter
I'm trying to split a line from a PIX Firewall log file and put it into an array. The log entries look like: Nov 13 07:28:55 10.0.0.3 %PIX-4-400025: IDS:2154 ICMP ping of death from 123.123.123.123 to 124.124.124.124 on interface outside Here is the code i've tried: ...

Re: Off-Topic (200%) - Where are you from?

2001-11-13 Thread Alfred Vahau
PNG, short for Papua New Guinea. Look at northern tip of Australia to locate PNG, in the South West Pacific. A lonely perl user and one of few unix users in this part of the world. You get it. MS rules here. I'm a break free. Cheers, Alfred Vahau Uni. PNG -- To unsubscribe, e-mail: [EMAIL

accepting --stdin from sudo command

2001-11-13 Thread Daniel Falkenberg
Hey all, I really want to be able to issue this command from a perl script but unfortunatly I don't want to have to use the expect programming language to input the password. I have the following command below... Does this look OK? echo password | sudo cp -f /etc/passwd /home/me --stdin Cheers

Re: installing modules

2001-11-13 Thread Dave Storrs
On Tue, 13 Nov 2001, Rahul Garg wrote: > i have actually got the solution. > if i have the module Bar.pm in directory '/usr/home/rahul/myMod' > then in the perl script that uses this module i have to include the > statement > > use lib '/usr/home/rahul/myMod' ; > use Bar ; > > Thanks, > Rahul

Re: Off-Topic (200%) - Where are you from?

2001-11-13 Thread Dave Storrs
At the moment, New York, a.k.a. "Terrorist Target Number #1" :/ Dave -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Off-Topic (200%) - Where are you from?

2001-11-13 Thread Russell Boyd
Todays Low 63 degrees Fahrenheit Todays High 76 degrees Fahrenheit The morning swim was quite nice. Austin, Texas Hope y'all enjoy the snow. Russell >>> Michael Fowler <[EMAIL PROTECTED]> 11/13/01 03:14PM >>> On Tue, Nov 13, 2001 at 02:51:01PM -0600, Elliott, Don (Police) wrote: > Having fun

Re: File attributes

2001-11-13 Thread Curtis Poe
--- "Faulkingham, Shawn" <[EMAIL PROTECTED]> wrote: > Does anyone know of a module that will retrieve extended attributes for > file? I am looking for the last accessed date on a file, to produce of list > of old files. I am sure that it can be done, I am just unaware of a module > that does this

RE: File attributes

2001-11-13 Thread Wagner-David
You can use stat which produces 13 different characteristics about a file(one of them being the last access time). See your perldoc -f stat Wags ;) -Original Message- From: Faulkingham, Shawn [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 13, 2001 13:45 To

RE: regexp

2001-11-13 Thread Wagner-David
You don't need to read the whole file in, but could try somehting like this: Script starts next line: #!perl -w my $counter = 1; my %headinghash; while () { chomp; if ( /^(\d+)\.\s+(.*)/ ) { $counter = $1; $Headinghash{$counter} = $2 . "\n"; }elsif ( ! /${c

File attributes

2001-11-13 Thread Faulkingham, Shawn
Does anyone know of a module that will retrieve extended attributes for file? I am looking for the last accessed date on a file, to produce of list of old files. I am sure that it can be done, I am just unaware of a module that does this already. Any help is appreciated. Shawn Faulkingham - CCNA

Re: Off-Topic (200%) - Where are you from?

2001-11-13 Thread Michael Fowler
On Tue, Nov 13, 2001 at 02:51:01PM -0600, Elliott, Don (Police) wrote: > Having fun in Saskatoon, Saskatchewan, Canada > It's mid November, no snow and still above freezing Oh ye of the Lesser North. It's mid-November, our temperatures are hovering between zero and freezing, and I believe we've

Re: YARQ (Yet Another Regexp Question)

2001-11-13 Thread A. Rivera
I have used this little routine to strip HTML. Might be ineffecient, I don't know.. Assuming HTML has been loaded into variable $html $html=~ s/\n//g; $html=~ s/>/>\n/g; @html=split(/\n/, $html); foreach $_(@html) { $_=~ s/<.*>//g; $newhtml.=$_; } print $newhtml; Agustin Rivera - O

Re: sending value vs pointer

2001-11-13 Thread Etienne Marcotte
well thanks for the explanation.. I asked because we saw pointer in my last C class (buy the way I hate ANSI C).. and was wondering, when sending an array of let's say 6 strings, if it would be faster to send the adress of this array, kind of like we do in C by using pointers. Then the sub can m

Re: Off-Topic (200%) - Where are you from?

2001-11-13 Thread "José A. Ferrer"
From Alicante - SPAIN ( Mediterranean Coast ) The sun lives here... -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

regexp

2001-11-13 Thread birgit kellner
I have a file structured like this: 1. This is a heading ... 1.1. A subheading 1.2. Another subheading 2. Another heading .. 3. Yet another heading . I want to extract (a) each heading number with the matching heading text, and (b) the immediately following text up to, and not inclu

Re: sending value vs pointer

2001-11-13 Thread Curtis Poe
--- Etienne Marcotte <[EMAIL PROTECTED]> wrote: > This is a very newbie question.. > > When sending arguments to a sub, is it preferable to send a pointer to > this value or the value itself. Or after x arguments it's better to send > references? > > Etienne Etienne, I think Brett W. McCoy gav

RE: Off-Topic (200%) - Where are you from?

2001-11-13 Thread Elliott, Don (Police)
Having fun in Saskatoon, Saskatchewan, Canada It's mid November, no snow and still above freezing Don Elliott -Original Message- From: Mark Symonds [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 13, 2001 2:13 PM To: [EMAIL PROTECTED] Subject: Re: Off-Topic (200%) - Where are you fro

Re: YARQ (Yet Another Regexp Question)

2001-11-13 Thread Etienne Marcotte
Thanks for the hint. http://www.perl.com/CPAN/authors/Tom_Christiansen/scripts/striphtml.gz is pretty well explaned, it will help my regexp knowledge. But if I want to keep some tags, or only remove some others I'll have to play with some if $1 eq "foo" exit the regexp or I don't know. Anyways

Re: YARQ (Yet Another Regexp Question)

2001-11-13 Thread Curtis Poe
--- Etienne Marcotte <[EMAIL PROTECTED]> wrote: > I saw somewhere on the web a good regexp for removing html tags. Can't > re-find it and it needed some minor mods. Etienne, No offense, but there are not good regexes for removing HTML tags. Here are some legal tags that break most regular expr

Re: Off-Topic (200%) - Where are you from?

2001-11-13 Thread Mark Symonds
Greetings from balmy Huntington Beach, California -- Mark -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: YARQ (Yet Another Regexp Question)

2001-11-13 Thread Bob Showalter
> -Original Message- > From: Etienne Marcotte [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, November 13, 2001 2:44 PM > To: [EMAIL PROTECTED] > Subject: YARQ (Yet Another Regexp Question) > > > I saw somewhere on the web a good regexp for removing html tags. Can't > re-find it and it neede

Re: regex help

2001-11-13 Thread Brett W. McCoy
On Tue, 13 Nov 2001, A. Rivera wrote: > I need help find the most effecient way to do this.. > > I have a variable... > $data="this is a test"; > > What is the quickest way to get $data to equal just the first two words of > the original variable This splits the string up, extracts the firs

YARQ (Yet Another Regexp Question)

2001-11-13 Thread Etienne Marcotte
I saw somewhere on the web a good regexp for removing html tags. Can't re-find it and it needed some minor mods. Let's say the $line is 'this is a large wordin size 2'; I played a little around, but it always removed between the first < and the last > (and I knwo the tutorial on the web said how

RE: regex help

2001-11-13 Thread Bob Showalter
> -Original Message- > From: A. Rivera [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, November 13, 2001 1:39 PM > To: [EMAIL PROTECTED] > Subject: regex help > > > Ok, > > I need help find the most effecient way to do this.. > > I have a variable... > $data="this is a test"; > > What is

regex help

2001-11-13 Thread A. Rivera
Ok, I need help find the most effecient way to do this.. I have a variable... $data="this is a test"; What is the quickest way to get $data to equal just the first two words of the original variable print $data; this is Thanks, Agustin -- To unsubscribe, e-mail: [EMAIL PROTECT

Re: Array problems!

2001-11-13 Thread Greg Meckes
Maybe try: open(MYFILE, $match) || die "Can't open file: $!"; my @filelist = ; close(MYFILE); chomp @filelist; foreach (@filelist) { find \&wanted($_), "."; } sub wanted { my $File = shift; print "Match found at : $File::Find::name\n" if $File; } For the $b array just: while (defined($b=

RE: Array problems!

2001-11-13 Thread Bob Showalter
> -Original Message- > From: Ben Crane [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, November 13, 2001 10:30 AM > To: [EMAIL PROTECTED] > Subject: Array problems! > > > I create a dummy file with 4 filenames in it...I have > read these 4 names into @filelist...and when I pass > the array t

Array problems!

2001-11-13 Thread Ben Crane
I create a dummy file with 4 filenames in it...I have read these 4 names into @filelist...and when I pass the array to &wanted, it only looks for the last file..I KNOW this works with arrays, I've done it before...why does it keep taking the last value only??? #!usr/bin/perl -w use File::Find; $

Re: sending value vs pointer

2001-11-13 Thread Brett W. McCoy
On Tue, 13 Nov 2001, Etienne Marcotte wrote: > When sending arguments to a sub, is it preferable to send a pointer to > this value or the value itself. Or after x arguments it's better to send > references? It all depends on what the function is doing. For complex data structures, references ar

expanding a pattern

2001-11-13 Thread Daniel Kidger
I have a pattern like $hosts = "fred[1,3-7,9-22]" Is there a simple way to generate an expanded list like: fred1 fred3 fred4 fred5 ... etc. ? Daniel. -- Dr. Dan Kidger, Quadrics Ltd. [EMAIL PROTECTED] One Bridewell St.,

sending value vs pointer

2001-11-13 Thread Etienne Marcotte
This is a very newbie question.. When sending arguments to a sub, is it preferable to send a pointer to this value or the value itself. Or after x arguments it's better to send references? Etienne -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Carp and XML::Parser and INIT, oh my

2001-11-13 Thread Jon Cassorla
I ran into a problem using the Carp module in an INIT block while using the XML::Parser module. It seems as though there is something uninitialized within the module until after the INIT block. Once my INIT block is completed, all is well. Anyone understand why using it is problematic here? I

Re: Can perl dynamically modify images?

2001-11-13 Thread Etienne Marcotte
There is a HUGE pdf on imagemagick at http://www.e.kth.se/unix-systemet/admin/ImageMagick/ImageMagick.pdf but it's not for the very last version, at least it will get you working and do probably everything. There is a section in that pdf about perlmagick. I never used it but once my website wil

Re: recommended perl training in UK?

2001-11-13 Thread Chris Ball
On Tue, 2001-11-13 at 09:36, PURMONEN, Joni wrote: > This is probably the nices thing one can do at work: my boss asked me to > find out good quality perl training for intermediate - advanced perl in UK. > After a lot of searching around none of the places i found really convinced. Hi, Joni. The

Re: installing modules

2001-11-13 Thread Rahul Garg
i have actually got the solution. if i have the module Bar.pm in directory '/usr/home/rahul/myMod' then in the perl script that uses this module i have to include the statement use lib '/usr/home/rahul/myMod' ; use Bar ; Thanks, Rahul - Original Message - From: EternalLifeThereAfter <

Re: basic pattern matching

2001-11-13 Thread EternalLifeThereAfter
- Original Message - From: "Gibbs Tanton - tgibbs" <[EMAIL PROTECTED]> To: "'HANSON '" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Saturday, November 10, 2001 8:06 AM Subject: RE: basic pattern matching > You can look at perldoc perlre for regular expression help and > perldoc perlop

Re: installing modules

2001-11-13 Thread EternalLifeThereAfter
- Original Message - From: "Rahul Garg" <[EMAIL PROTECTED]> To: "Dave Storrs" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; "eventualdeath" <[EMAIL PROTECTED]> Sent: Monday, November 12, 2001 2:49 PM Subject: Re: installing modules > But > if i want to have my module(say, same as above) in

recommended perl training in UK?

2001-11-13 Thread PURMONEN, Joni
Hi all, This is probably the nices thing one can do at work: my boss asked me to find out good quality perl training for intermediate - advanced perl in UK. After a lot of searching around none of the places i found really convinced. Can anyone recommend any places? Or do I have to fly over the

RE: Off-Topic (200%) - Where are you from?

2001-11-13 Thread Erwin Blonk
The Hague, The Netherlands YACH (Yet another CheeseHead) __ Do You Yahoo!? Find the one for you at Yahoo! Personals http://personals.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Off-Topic (200%) - Where are you from?

2001-11-13 Thread Arnald S S
Wishes from Chennai, India. Arnald :-) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Redirecting STDERR to 2 locations simultaneously

2001-11-13 Thread Crowder, Rod
Try the Module IO::Tee, I haven't used it, but it's description sounds to be what you need > -Original Message- > From: Peter Scott [mailto:[EMAIL PROTECTED]] > Sent: 13 November 2001 07:01 > To: [EMAIL PROTECTED] > Subject: Re: Redirecting STDERR to 2 locations simultaneously > > >

Re: Off-Topic (200%) - Where are you from?

2001-11-13 Thread nafiseh saberi
hi. I am in Irantime is 11:30 a.m Truly yours. Try to have simple habits and deep thoughts. -Original Message- From: Robert Graham <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] <[EMAIL PROTECTED]> Date: ÓåÔäÈå, 22 Â