Re: Crypt:: or ???

2002-05-31 Thread Teresa Raymond
I thought that I would need to decrypt to check to see if the password submitted was the correct password, please explain why this is not so... >on Fri, 24 May 2002 21:54:09 GMT, Teresa Raymond wrote: > >> Which module is the easiest to learn and offers the best >> encryption/decryption? The

Re: union of times algorithm

2002-05-31 Thread David T-G
Bryan, et al -- ...and then Bryan R Harris said... % % Nope, the compiler won't allow that... Does it work for you? % % It gives the errors: % Scalar value @lines[0] better written as $lines[0] at ... % Can't use subscript on array slice at ... near "1]" % Execution ... aborted due to c

RE: union of times algorithm

2002-05-31 Thread Ovid
--- Bryan R Harris <[EMAIL PROTECTED]> wrote: > > Thanks Ovid, Timothy... > > You mention checking out perlref in the perldocs-- I'm familiar with > "perldoc -f keyword", but how would I find information on these things if I > didn't know the keyword "perlref"? (Apparently I'm the only legitima

RE: union of times algorithm

2002-05-31 Thread Timothy Johnson
Ooh, you know, I didn't try it with an array of arrays. I guess you would have to dereference the array first. print "@{$lines[0]}[0,1]\n"; -Original Message- From: Bryan R Harris [mailto:[EMAIL PROTECTED]] Sent: Friday, May 31, 2002 3:26 PM To: [EMAIL PROTECTED] Subject: RE: union of

Re: sendmail issue

2002-05-31 Thread Geoffrey F. Green
Look at the error message > E:\sea621\siebsrvr\BIN\Perl\bin>outlook.pl > Global symbol "%mail" requires explicit package name at > E:\sea621\siebsrvr\BIN\P > erl\bin\outlook.pl line 21. [snip] When you use strict, you need to explicitly define your variables using "my" or "our" > #!/usr/bin/p

RE: union of times algorithm

2002-05-31 Thread Bryan R Harris
Ovid, Jonathan, Thank you so much, I think my understanding of Perl went up a whopping 50% today (incidentally placing me somewhere in the bottom 3% of the list readers, I fear). I can feel my addiction growing daily... Thanks again. - B __ > You mention checking out perlre

count issue

2002-05-31 Thread Lance Prais
I would like to read the following to see if on line is repeating more then once. I would start this? I was trying something similar : my $line=$_; my @results = $line =~ m/(sleeping for 10)/gi; print 'Found ', scalar (@results), " occurences\n"; Psodo code: If occurrences > 2 { Do something

RE: union of times algorithm

2002-05-31 Thread Bryan R Harris
pow, that did it. I tried every combination of @ signs and braces I could think of except that one. =) __ Ooh, you know, I didn't try it with an array of arrays. I guess you would have to dereference the array first. print "@{$lines[0]}[0,1]\n"; -Original Message

sendmail issue

2002-05-31 Thread Lance Prais
I am getting the following error when using use::send mail. E:\sea621\siebsrvr\BIN\Perl\bin>outlook.pl Global symbol "%mail" requires explicit package name at E:\sea621\siebsrvr\BIN\P erl\bin\outlook.pl line 21. Global symbol "%mail" requires explicit package name at E:\sea621\siebsrvr\BIN\P erl

count issue

2002-05-31 Thread Lance Prais
I would like to read the following to see if on line is repeating more then once. I would start this? I was trying something similar : my $line=$_; my @results = $line =~ m/(sleeping for 10)/gi; print 'Found ', scalar (@results), " occurences\n"; Psodo code: If occurrences > 2 { Do somethin

RE: union of times algorithm

2002-05-31 Thread Jonathan E. Paton
> You mention checking out perlref in the perldocs - I'm familiar > with "perldoc -f keyword", but how would I find information on > these things if I didn't know the keyword "perlref"? I can't find any email answering this question: perldoc perl OR perldoc perltoc isn't it so

RE: union of times algorithm

2002-05-31 Thread Bryan R Harris
Nope, the compiler won't allow that... Does it work for you? It gives the errors: Scalar value @lines[0] better written as $lines[0] at ... Can't use subscript on array slice at ... near "1]" Execution ... aborted due to compilation errors. - B __ No. I just ran into

RE: union of times algorithm

2002-05-31 Thread Timothy Johnson
No. I just ran into this problem myself. If you want to print an array slice, you will have to use the @ symbol at the beginning. print "@lines[0][0,1]\n"; -Original Message- From: Bryan R Harris [mailto:[EMAIL PROTECTED]] Sent: Friday, May 31, 2002 3:15 PM To: [EMAIL PROTECTED] Su

RE: union of times algorithm

2002-05-31 Thread Bryan R Harris
Thanks Ovid, Timothy... You mention checking out perlref in the perldocs-- I'm familiar with "perldoc -f keyword", but how would I find information on these things if I didn't know the keyword "perlref"? (Apparently I'm the only legitimate "beginner" here! =) Oh, and one more question. =)

RE: deleting a file

2002-05-31 Thread Shishir K. Singh
perldoc -f unlink -Original Message- From: Shishir K. Singh Sent: Friday, May 31, 2002 6:14 PM To: Lance Prais; Perl Subject: RE: deleting a file use unlink perl -f unlink -Original Message- From: Lance Prais [mailto:[EMAIL PROTECTED]] Sent: Friday, May 31, 2002 6:10 PM To: P

RE: deleting a file

2002-05-31 Thread Shishir K. Singh
use unlink perl -f unlink -Original Message- From: Lance Prais [mailto:[EMAIL PROTECTED]] Sent: Friday, May 31, 2002 6:10 PM To: Perl Subject: deleting a file Is it possible to delete a file or remove all the data using a perl command? I am using perl on windows, can you include dos

deleting a file

2002-05-31 Thread Lance Prais
Is it possible to delete a file or remove all the data using a perl command? I am using perl on windows, can you include dos commands within perl I tried to include Del in my script and it blew up. Thanks Lance -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail:

300coins| professor's correct email address

2002-05-31 Thread lance miller
Sorry all, the correct email is [EMAIL PROTECTED] for this instructor who I CC-ed. For a more sure way of knowing the instructor's emails here is the webpage for the course: http://grace.evergreen.edu/cnc/ I sent him a more detailed email later with my code, my strategy...commiting myself to my

RE: union of times algorithm

2002-05-31 Thread Timothy Johnson
Before I start, don't forget to check out perlref in the perldocs. Some quick definitions: Reference - simplified, a reference points to another variable or structure. This allows us to use one variable to manipulate another 1. $somevar = [@somearray,$somescalar]; Creates a reference to an

RE: union of times algorithm

2002-05-31 Thread Ovid
--- Ovid <[EMAIL PROTECTED]> wrote: > > 3. and this?: $somevar = \@somearray; > > Putting a backslash in front a a sigil creates a returns a reference to it... That was coherent. :) I have come to the conclusion that I will be a better programmer if I can only learn to type. That fi

RE: union of times algorithm

2002-05-31 Thread Ovid
--- Bryan R Harris <[EMAIL PROTECTED]> wrote: > > Wow, you guys are amazing... This most recent seems to work, so I'm set > (though I still don't quite understand it). > > A few quick questions: > > 1. What does this do?: $somevar = [ @somearray, $somescalar ]; The construct "@somea

RE: union of times algorithm

2002-05-31 Thread Bryan R Harris
Wow, you guys are amazing... This most recent seems to work, so I'm set (though I still don't quite understand it). A few quick questions: 1. What does this do?: $somevar = [ @somearray, $somescalar ]; 2. and this?: $somevar = $someothervar->[$athirdvar]; 3. and this?:

Paypal IPN

2002-05-31 Thread A. Rivera
I'm curious if anyone has had any experience with Paypal IPN (instant payment notification)? Regards, Agustin Rivera Webmaster, Pollstar.com / PollstarOnline.com

Paypal IPN

2002-05-31 Thread A. Rivera
I'm curious if anyone has had any experience with Paypal IPN (instant payment notification)? Regards, Agustin Rivera Webmaster, Pollstar.com / PollstarOnline.com

Re: loop script that never ends

2002-05-31 Thread Peter Scott
At 02:25 PM 5/31/02 -0500, Lance Prais wrote: >I am trying to call a script that will run every 10 seconds for 1 minute >then exit. > >[snip] >There are a couple of problems that I am having: >1. The script is never ending. I though "while (1)" is the right way to >do this. Out of curiosity

Re: loop script that never ends

2002-05-31 Thread Jeff 'japhy' Pinyan
On May 31, Lance Prais said: >There are a couple of problems that I am having: >1. The script is never ending. I though "while (1)" is the right way to >do this. The script never ends because you're using 'while (1) { ... }'. That goes on forever. You'll have to tell Perl to stop manually

loop script that never ends

2002-05-31 Thread Lance Prais
I am trying to call a script that will run every 10 seconds for 1 minute then exit. This code calls a siebel function that writes to a .txt file. $cmd = '..\\..\\srvrmgr /g apollo.ts.checkpoint.com /e CHK_ENT_PRD /s CHK_SBL_PRD /u xxx /p xx /c "list tasks for server CHK_SBL_PRD co

Re: Win32::Service on UNIX?

2002-05-31 Thread drieux
On Friday, May 31, 2002, at 09:28 , Ian Samuel wrote: > Win32::Service Really Good Question Have you looked at SMB http://search.cpan.org/search?mode=module&query=SMB ciao drieux --- some fun places to look at ideas would include: http://www.shebeen.com/hack.htm -- To unsubscribe,

RE: union of times algorithm

2002-05-31 Thread Jonathan E. Paton
> Okay, I've repaired it - it now works fine under warnings and strict. > Almost all my code is written for strictures, I just posted my code > in an intermediate form without having debugged it. I think it still > isn't working right, as the answer given is 6 but I reckon it should > be 7! Hi g

RE: Regex Problem!!- SOS

2002-05-31 Thread Shishir K. Singh
Thanks a lot Dave!! -Original Message- From: David Gray [mailto:[EMAIL PROTECTED]] Sent: Friday, May 31, 2002 2:45 PM To: [EMAIL PROTECTED] Cc: Shishir K. Singh Subject: RE: Regex Problem!!- SOS > if ($var =~ /^$var1/) { if($var =~ /^\Q$var1\E/) { Should solve your problem -- the \Q

Re: use confusion

2002-05-31 Thread Michael Fowler
On Fri, May 31, 2002 at 08:49:30AM -0400, Pete Emerson wrote: > The following example does what is expected, i.e. prints out the word > password on its own line. > > used.pm > --- > $password='password'; > > use.pl > -- > #!/usr/bin/perl > > require "./used.pm"; > print "$password\n"; >

RE: union of times algorithm

2002-05-31 Thread Shishir K. Singh
yes...it won't work if it overlaps...but again it was assumed that the @start time would be in ascending order. the example that you have cited...the start @start array will just need to be sorted in ascending order. my @start = (25,10, 5); my @stop = (45,35,30); # Sort the start /stop arr

RE: Regex Problem!!- SOS

2002-05-31 Thread David Gray
> if ($var =~ /^$var1/) { if($var =~ /^\Q$var1\E/) { Should solve your problem -- the \Q and \E tell the regex to stop (and start again) interpolating any regex characters it finds in the variable. HTH, -dave -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [

Select a record if exists in other file

2002-05-31 Thread Ned Cunningham
OK, Now I am trying to select only records that are in both files. I am trying to go through one file and then check if it is in the next. I am stumped? Snip open VEH, $veh or die "Cant open it :$!"; open CKEY, $ckey or die "Cant open it :$!"; open WRFILE, ">$wrfile"; while (defined ($line

RE: union of times algorithm

2002-05-31 Thread Jonathan E. Paton
--- "Shishir K. Singh" <[EMAIL PROTECTED]> wrote: > Is there something wrong with this algo ?? Yes, it isn't valid perl. You didn't debug yours either, did you? :P Anyway, yes there is a problem... I think. What happens if your timeslices overlap? E.g. my @start = (25, 10, 5); my @stop =

RE: union of times algorithm

2002-05-31 Thread Shishir K. Singh
Extracted from book?? Now now guys ...give me some credit!! I come from C background and that's the most logical way that I can think of coding within the given constraints. Small, simple..and compact. -Original Message- From: Jonathan E. Paton [mailto:[EMAIL PROTECTED]] Sent: Frida

RE: union of times algorithm

2002-05-31 Thread Jonathan E. Paton
--- [EMAIL PROTECTED] wrote: > No. you have 11,12 as 2 when only 1. Right? > > Wags ;) Oops, yeah. I guess I made it easy for you to spot, could do something about the complexity, couldn't you? O(length of total timeframe) isn't exactly hot. I'm looking at Shishir K. Singh's algorithm

RE: union of times algorithm

2002-05-31 Thread Wagner-David
No. you have 11,12 as 2 when only 1. Right? Wags ;) -Original Message- From: Jonathan E. Paton [mailto:[EMAIL PROTECTED]] Sent: Friday, May 31, 2002 10:58 To: [EMAIL PROTECTED] Subject: RE: union of times algorithm --- [EMAIL PROTECTED] wrote: > What we have is as stated

RE: union of times algorithm

2002-05-31 Thread Shishir K. Singh
Is there something wrong with this algo ?? my @start = (3,4, 15, 23, 29, 34, 37); my @stop = (5,10,20, 29, 33, 36, 37); # Assuming that the start and the stop array have the # same number of elements and each start corresponds with # e

Connect MySQL with Majordomo in a Perl Script?

2002-05-31 Thread Miretsky, Anya
Hi, Can anyone point me to some documentation or examples of how to write a Perl script that will get a list of email addresses from a mysql database and use Majordomo to send an email to all of them? I've written scripts before that get data from mysql but have no clue how to connect this to M

RE: union of times algorithm

2002-05-31 Thread Jonathan E. Paton
--- [EMAIL PROTECTED] wrote: > What we have is as stated a union of times. So all I do is take the > timeslices and generate a hash element for each time. I don't check to see > if it is already there, but just set to one. Then I sort the hash down > numerically and total where current minu

Regex Problem!!- SOS

2002-05-31 Thread Shishir K. Singh
I have a snippet of code which follows like this $var = "C:/Perl/examples/Extending/Typemaps_with_XS/Car_c++_obj/test.pl"; $var1 = "C:/Perl/examples/Extending/Typemaps_with_XS/Car_c++_obj"; if ($var =~ /^$var1/) {

Re: Reassure the drieux on this one

2002-05-31 Thread Peter Scott
At 07:11 AM 5/31/02 -0700, drieux wrote: >On Thursday, May 30, 2002, at 07:21 , Peter Scott wrote: > >>At 06:20 PM 5/30/02 -0700, drieux wrote: >[..] >>>I had to do the initialization or the 'if' whined at me... and >>>yes logically it has to be $key > 0. >> >>I'm missing the reason this can't be

Re: SOLVED:how to parse filenames with spaces using regex

2002-05-31 Thread drieux
On Friday, May 31, 2002, at 08:29 , Johnson, Shaunn wrote: [..] > [script] > > foreach my $file ( split (/\n/, `ls -d1 $sambadir/*` ) ) { > print "we see file :$file:\n"; > #$file=(split(//, $sambadir/$file) ); > print "$sambadir/$file"; > system ("/bin/mount -rt i

Re: Simple array question

2002-05-31 Thread Peter Scott
At 11:17 AM 5/31/02 -0400, Barry Jones wrote: >What type of functions are built in to perl for arrays? > >Mainly, I'm looking to find out how to see how many elements are in an >array without counting them, but I was wondering about others too. > >What about hashes? perldoc perlfunc lists them un

RE: union of times algorithm

2002-05-31 Thread Wagner-David
What we have is as stated a union of times. So all I do is take the timeslices and generate a hash element for each time. I don't check to see if it is already there, but just set to one. Then I sort the hash down numerically and total where current minus previous equal 1. Here is a shot:

Win32::Service on UNIX?

2002-05-31 Thread Ian Samuel
Title: Win32::Service on UNIX? Hello, Is there any equivalent for Win32::Service on Unix? That is, a way for a Unix box running Perl to get information about the state of another machine's Win32 services? TIA, Ian Samuel -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional com

RE: Printing all elements of an Array except the first?

2002-05-31 Thread Shishir K. Singh
Oops..sorry...forgot the counter in the first column of your output... ## open (CUST, "<$cust") or die "Cant open it :$!"; $newnum = 0; while () { chomp; @data = split /\|/; $newnum++; $hData{$data[1]}{$newnum} = [@data]; # 2 dimensional h

Re: Printing all elements of an Array except the first?

2002-05-31 Thread David T-G
Ned -- ...and then Ned Cunningham said... % % OOPS :-( % I wanted to sort the file that I am writing, by the second element in @DATA? OK. You're also writing out a count number, it looks like: % Snip % open CUST, $cust or die "Cant open it :$!"; % open WRFILE, ">$wrfile"; % % while (defined

RE: 300 coins game in perl

2002-05-31 Thread lance miller
Seems like the Spyware case has been settled, and (hopefully) I can point people to my school linux server without apprehension. I got a response I wanted the perl re-written in a more mature coding style. here is my original again: source code http://grace.evergreen.edu/~millan06/x/cgi-bin/

RE: Printing all elements of an Array except the first?

2002-05-31 Thread Shishir K. Singh
I generally do it the tough way :( ### open (CUST, "<$cust") or die "Cant open it :$!"; $newnum = 0; while () { chomp; @data = split /\|/; $newnum++; $hData{$data[1]}{$newnum} = [@data]; # 2 dimensional hash used in case your 2nd element may

Re: Back Chat:RE: Help with parsing output

2002-05-31 Thread drieux
On Friday, May 31, 2002, at 07:20 , Sudarsan Raghavan wrote: [..] > > Can the OP confirm if it works fine > > I cut-pasted the input from original mail. Can you attach the file that > you are > using as input so that I can test it here. http://www.wetware.com/drieux/pbl/Sys/Admin/prstatFilter.t

Re: SOLVED:how to parse filenames with spaces using regex

2002-05-31 Thread David T-G
Shaunn -- ...and then Johnson, Shaunn said... % % % --never mind ... % % --i think if i can figure out how to put it % in double quotes, it'll work just fine. See my reply :-) % % --thanks anyways. HTH & HAND % % -X :-D -- David T-G * It's easier to fight for on

SOLVED:how to parse filenames with spaces using regex

2002-05-31 Thread Johnson, Shaunn
--never mind ... --i think if i can figure out how to put it in double quotes, it'll work just fine. --thanks anyways. -X -Original Message- Subject: RE: how to parse filenames with spaces using regex --UPDATE: --Thanks for the help. I think I'm close, but I think I ran a snag:

RE: Printing all elements of an Array except the first?

2002-05-31 Thread Ned Cunningham
OOPS :-( I wanted to sort the file that I am writing, by the second element in @DATA? Snip open CUST, $cust or die "Cant open it :$!"; open WRFILE, ">$wrfile"; while (defined ($line = )) { chomp $line; @data = split(/\|/,$line); $newnum=$newnum+1; printf WRFILE ("0%9d",$newnum); print WRFILE "

RE: Simple array question

2002-05-31 Thread Shishir K. Singh
oops $#array is the index index of the last element -Original Message- From: Shishir K. Singh Sent: Friday, May 31, 2002 11:23 AM To: Barry Jones; Beginners @ Perl (E-mail) Subject: RE: Simple array question No of elements in an array is given by $#ARRAY_NAME eg the number of element

Re: Printing all elements of an Array except the first?

2002-05-31 Thread Jonathan E. Paton
> >> I want to write to a file all of the array(@data), except the first > >> field > > > >@data[1..-1] > > > >means the array @data from element 1 to the last element. > > Sadly, Perl does not support that syntax. Ranges must be > low..high. @foo[1..-1] doesn't work. Jonathan throttles th

RE: Simple array question

2002-05-31 Thread Shishir K. Singh
No of elements in an array is given by $#ARRAY_NAME eg the number of element in an array @array is $#array -Original Message- From: Barry Jones [mailto:[EMAIL PROTECTED]] Sent: Friday, May 31, 2002 11:17 AM To: Beginners @ Perl (E-mail) Subject: Simple array question What type of

Re: Printing all elements of an Array except the first?

2002-05-31 Thread David T-G
Ned -- ...and then Ned Cunningham said... % % Great, % Now how about sorting on the "new" first element of the array each time I % step through a file??? How about a little more detail? I'm not sure quite what you mean by new; you top-posted instead of providing any contextual reference. Give

Re: Simple array question

2002-05-31 Thread Jeff 'japhy' Pinyan
On May 31, Barry Jones said: >What type of functions are built in to perl for arrays? > >Mainly, I'm looking to find out how to see how many elements are in an >array without counting them, but I was wondering about others too. Arrays have push(), pop(), shift(), unshift(), and splice(). To get

Simple array question

2002-05-31 Thread Barry Jones
What type of functions are built in to perl for arrays? Mainly, I'm looking to find out how to see how many elements are in an array without counting them, but I was wondering about others too. What about hashes? Barry Jones DATABUILT, Inc. The Global AEC Information Company 1476 Fording Island

Re: how to parse filenames with spaces using regex

2002-05-31 Thread David T-G
Shaunn -- ...and then Johnson, Shaunn said... % % --UPDATE: % % --Thanks for the help. I think I'm close, but I % think I ran a snag: % % --When I try to mount the iso image, I get an error: % % [snip] % % [root@hmp perl]# mount -rt iso9660 -o loop /samba/hmp/iso/03/UNASSIGNED-03 - % DUMMY

RE: Printing all elements of an Array except the first?

2002-05-31 Thread Ned Cunningham
Great, Now how about sorting on the "new" first element of the array each time I step through a file??? -Original Message- From: David T-G [mailto:[EMAIL PROTECTED]] Sent: Friday, May 31, 2002 11:11 AM To: perl beginn

Re: help in regular expression

2002-05-31 Thread Jeff 'japhy' Pinyan
On May 31, Ankit Gupta said: >$dirstruct =~ s/([\W])/-/; You're missing the /g modifier. And s/([\W])/-/g could be written as s/\W/-/g and would be a bit more efficient. -- Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/ RPI Acacia brother #734 http://www.perlmo

Re: Printing all elements of an Array except the first?

2002-05-31 Thread David T-G
Jonathan, et al -- ...and then Jonathan E. Paton said... % % --- Ned Cunningham <[EMAIL PROTECTED]> wrote: > Snip % > ... % > @data = split(/\|/,$line); % > $newnum=$newnum+1; % > printf WRFILE ("0%9d",$newnum); % > % > print WRFILE ";", @data, ";"; ... % > % > I want to write to a file all

Re: Subroutine

2002-05-31 Thread Sudarsan Raghavan
[EMAIL PROTECTED] wrote: > Hi, > > I'm having a very frustrating time with a small test program I'm trying to > write. I'm using ActivePerl 5. I'm sure the answer is simple and I'll kick > myself when someone clarifies the matter, but here goes anyway: > > The error message is: > > "Undefined sub

RE: Subroutine

2002-05-31 Thread Shishir K. Singh
Does it work if you define your subroutine before the main program?? If yes , try prototyping. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, May 31, 2002 10:27 AM To: [EMAIL PROTECTED] Subject: Subroutine Hi, I'm having a very frustrating time w

Subroutine

2002-05-31 Thread Anne . Webel
Hi, I'm having a very frustrating time with a small test program I'm trying to write. I'm using ActivePerl 5. I'm sure the answer is simple and I'll kick myself when someone clarifies the matter, but here goes anyway: The error message is: "Undefined subroutine &main::html_chars called at test

Re: Printing all elements of an Array except the first?

2002-05-31 Thread Jeff 'japhy' Pinyan
On May 31, Jonathan E. Paton said: > --- Ned Cunningham <[EMAIL PROTECTED]> wrote: > Snip >> >> I want to write to a file all of the array(@data), except the first >> field > >@data[1..-1] > >means the array @data from element 1 to the last element. Sadly, Perl does not support that syntax.

RE: help in regular expression

2002-05-31 Thread Shishir K. Singh
You forgot to add g (global)in the end... $dirstruct =~ s/([\W])/-/g; Cheers Shishir -Original Message- From: Ankit Gupta [mailto:[EMAIL PROTECTED]] Sent: Friday, May 31, 2002 10:53 AM To: [EMAIL PROTECTED] Subject: help in regular expression Hello Friends, I need help in the below w

help in regular expression

2002-05-31 Thread Ankit Gupta
Hello Friends, I need help in the below written script. $dirstruct =~ s/([\W])/-/; print $dirstruct; here $dirstruct is c:\ankit\test what I need as output is c--ankit-test but the output given by my script is c-\ankit\test Thanx Ankit -- To unsubscribe, e-mail: [EMAIL PROTECTED] For

RE: how to parse filenames with spaces using regex

2002-05-31 Thread Johnson, Shaunn
--UPDATE: --Thanks for the help. I think I'm close, but I think I ran a snag: --When I try to mount the iso image, I get an error: [snip] [root@hmp perl]# mount -rt iso9660 -o loop /samba/hmp/iso/03/UNASSIGNED-03 - DUMMY-03.iso /t Usage: mount -V : print version mount

Re: use confusion

2002-05-31 Thread Chas Owens
On Fri, 2002-05-31 at 09:05, Jonathan E. Paton wrote: > --- Pete Emerson <[EMAIL PROTECTED]> wrote: > > There is a hackish tendancy when referring to the 'use' keyword > to use the form: > > use confusion; > > why? Because it is Perl's way of loading modules - this would > be a pragma (like

Re: Printing all elements of an Array except the first?

2002-05-31 Thread Jonathan E. Paton
--- Ned Cunningham <[EMAIL PROTECTED]> wrote: > Snip > > > open CUST, $cust or die "Cant open it :$!"; > open WRFILE, ">$wrfile"; > > while (defined ($line = )) { > > > chomp $line; > @data = split(/\|/,$line); > $newnum=$newnum+1; > printf WRFILE ("0%9d",$newnum); > > print WRFILE ";", @da

Printing all elements of an Array except the first?

2002-05-31 Thread Ned Cunningham
Snip open CUST, $cust or die "Cant open it :$!"; open WRFILE, ">$wrfile"; while (defined ($line = )) { chomp $line; @data = split(/\|/,$line); $newnum=$newnum+1; printf WRFILE ("0%9d",$newnum); print WRFILE ";", @data, ";"; print WRFILE "\n"; } close CUST; close WRFILE; End I want to w

Re: Back Chat:RE: Help with parsing output

2002-05-31 Thread Sudarsan Raghavan
drieux wrote: > On Friday, May 31, 2002, at 02:13 , Sudarsan Raghavan wrote: > > > while () { > > chomp; > > s/^\s+//; > > next if ((1 .. /^NPROC/) || m/^$/); > ># The conditions have been swapped here > ># Explanation for this is one of my earlier mails >

Re: Strip html from filehandle? >was win command console exe how perl launch & capture its STDOUT?

2002-05-31 Thread Felix Geerinckx
on Fri, 31 May 2002 01:57:19 GMT, [EMAIL PROTECTED] (Alan C.) wrote: > my $output = qx(graburl > http://www.wrh.noaa.gov/cgi-bin/Sacramento/afd?SFOZFPSTO); > open MYWTHR, ">myweathr" > or die "Cannot create mywthr_txt: $!"; > print MYWTHR "$output"; > #end-- > But it pulls all content,

Re: Reassure the drieux on this one

2002-05-31 Thread drieux
On Thursday, May 30, 2002, at 07:21 , Peter Scott wrote: > At 06:20 PM 5/30/02 -0700, drieux wrote: [..] >> I had to do the initialization or the 'if' whined at me... and >> yes logically it has to be $key > 0. > > I'm missing the reason this can't be an array. What is the domain range > of th

RE: Problem reading a file and passing a variable

2002-05-31 Thread Chas Owens
I just had a terrible thought: what if Oracle (I am an Informix DBA) uses uppercase by default instead of lowercase. At the top of your program (next to "use DBI;") put "use Data::Dumper;". After the fetch put print Dumper($case); This will print the contents of $case to the screen. I believe

Re: Back Chat:RE: Help with parsing output

2002-05-31 Thread drieux
On Friday, May 31, 2002, at 02:13 , Sudarsan Raghavan wrote: > while () { > chomp; > s/^\s+//; > next if ((1 .. /^NPROC/) || m/^$/); ># The conditions have been swapped here ># Explanation for this is one of my earlier mails > unless (/^Total/) { >

use, do, require was Re: How to remove the loaded file

2002-05-31 Thread drieux
On Friday, May 31, 2002, at 02:30 , Sharan Hiremath wrote: [..] > It is not the config file which will be used via require. I'm Gonna toss this back into the list - since this is a 'design issue' that I fear can frag other folks as well... { I think we all abuse the 'use', 'require' , 'do' sequ

Re: use confusion

2002-05-31 Thread Jonathan E. Paton
--- Pete Emerson <[EMAIL PROTECTED]> wrote: There is a hackish tendancy when referring to the 'use' keyword to use the form: use confusion; why? Because it is Perl's way of loading modules - this would be a pragma (like strict and warnings). Of course, we need to get you to use: no confusio

use confusion

2002-05-31 Thread Pete Emerson
The following example does what is expected, i.e. prints out the word password on its own line. used.pm --- $password='password'; use.pl -- #!/usr/bin/perl require "./used.pm"; print "$password\n"; However, as soon as I turn on warnings and strict, and declare $password: #!/usr/bin/per

RE: Help with parsing output

2002-05-31 Thread Kipp, James
On Thursday, May 30, 2002, at 10:42 , Kipp, James wrote: <> very well. i see. > > while () { > next if $_ =~ /USER/; <<# # why not clean the front first and not need a $null # s/^\s+//; my($user,$cpu,$mem,$vmem,$cmd) = split(/\s+/); print ":$user:$cp

Re: a win command console exe how perl launch & capture its STDOUT?

2002-05-31 Thread Jenda Krynicky
From: "Alan C." <[EMAIL PROTECTED]> > I've a Win 2K command console executable. Once this .exe is launched, > its output goes to STDOUT. And, this output consists of text and > html, in size, just about the amount for a small to medium web page. > Also want to strip and discar

RE: Help with parsing output

2002-05-31 Thread Kipp, James
Thanks for the explanation. "Kipp, James" wrote: > > I think that is how he eliminates lines up to the NPROC line. so in other > words, next if range from line 1 to /^NPROC/. and it does work. Yes that is right, I also have to point out a potential problem here This will not work if the first

RE: 300 coins game in perl (Apology)

2002-05-31 Thread Todd_Hemsell
I went back to the site and it did NOT try and load anything on my machine, Best I can guess it was code launched on the Unload event from a previous site. I wish I knew what site it was but unfortunately I do not. My sincere apologies. I will investigate better before replying next time. All

Re: Error with perl compilation of GD

2002-05-31 Thread Janek Schleicher
Luis Valencia wrote at Thu, 30 May 2002 17:44:23 +0200: > HI, i try all of this and now i got a new error message > > proxyserver /downloads/GD-1.33 > sudo make perl > gcc -c -I/usr/local/include -I/usr/local/include/gd -fno-strict-aliasing -I/ >usr/local/include > -D_LARGEFILE_SOURCE -D_FILE_O

Re: Tk GUI problem

2002-05-31 Thread Sudarsan Raghavan
"Mok T.Y.-r15382" wrote: > While executing an example Tk code from the book, the following message prompts: > > "Can't locate Tk/FBox.pm in @INC (@INC contains: d:\perl\lib\site d:\perl\lib >c:\perl\lib c:\perl\lib\site c:\perl\lib\site .) at regexE > valuater1.0.2.pl line 111, chunk 1." > > Pr

Tk GUI problem

2002-05-31 Thread Mok T.Y.-r15382
While executing an example Tk code from the book, the following message prompts: "Can't locate Tk/FBox.pm in @INC (@INC contains: d:\perl\lib\site d:\perl\lib c:\perl\lib c:\perl\lib\site c:\perl\lib\site .) at regexE valuater1.0.2.pl line 111, chunk 1." Prior to the error execution, I install

Re: Back Chat:RE: Help with parsing output

2002-05-31 Thread Sudarsan Raghavan
"CATHY GEAR (TRUST HQ)" wrote: > Yes please post the final working solution! This is always helpful. > > Thanks > > Cathy > The best solution was John's offer while () { if ((/NPROC/ .. /^Total/) && /\d/) { my ($user, $mem, $cpu) = (split)[1, 4, 6]; print

Re: DB_file help.

2002-05-31 Thread Sudarsan Raghavan
Postman Pat wrote: > I am trying to create a small database with the information like this: > > Each record has a name ie : > Dog > And has the following traits: > color > weight > nick > > For example I could have the following data: > > Name: dog > Color: green > Weight:

Back Chat:RE: Help with parsing output

2002-05-31 Thread CATHY GEAR (TRUST HQ)
Yes please post the final working solution! This is always helpful. Thanks Cathy -Original Message- From: Sudarsan Raghavan [mailto:[EMAIL PROTECTED]] Sent: 31 May 2002 09:01 To: Kipp, James Cc: Perl Subject: Re: Help with parsing output **

Re: Help with parsing output

2002-05-31 Thread Sudarsan Raghavan
> < ... > so I fear his (1../^NPROC/) isn't doing quite what he was hoping that > it would be doing >> > > yes, i noticed that, but was easily fixed with minor adjustments I failed to notice this mail, was the adjustment what I had mentioned about swapping the conditions in the if statement.

Re: DB_file help.

2002-05-31 Thread eric-perl
On 31 May 2002, Postman Pat wrote: > I am trying to create a small database... > > How would I go about storing and retrieving this information? Any examples > please?? Pat: If you haven't already: Read "Programming the Perl DBI". It's actually a quick read and does a great job of introducing

RE: union of times algorithm

2002-05-31 Thread Jonathan E. Paton
> > I'm trying to come up with an algorithm that seems like it ought to be > > really easy, but it's turning out to be pretty tough... > > > > Basically I have three pairs of start/stop times, e.g.: > > > >3, 5 > >4, 10 > > 15, 20 > > > > I want the total time covered by all these ran

RE: 300 coins game in perl

2002-05-31 Thread lance miller
"tries to load that Spyware program GATOR." This is a college computer science dept linux server what's up with the claim that Gator is on itisn't Gator some sort thing for the commerce world? -lance --- [EMAIL PROTECTED] wrote: > Nothing Happens except your Website tries to load > th

DB_file help.

2002-05-31 Thread Postman Pat
I am trying to create a small database with the information like this: Each record has a name ie : Dog And has the following traits: color weight nick For example I could have the following data: Name: dog Color: green Weight: 66 Nick: doggie friend: cat Name: fox Color