RE: again me "kasi":a though question of using variable in pattern

2003-02-05 Thread Beau E. Cox
Hi Kasi - > -Original Message- > From: kasi ramanathen [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, February 05, 2003 8:10 PM > To: [EMAIL PROTECTED] > Subject: again me "kasi":a though question of using variable in pattern > > > > by using this code i get the right answer, but i want

Re: Working with Dates (was: Wroking with Dates)

2003-02-05 Thread Janek Schleicher
On Wed, 05 Feb 2003 22:20:54 +, Thomas Williams wrote: > I got dates in the -mm-dd format, and I need to compare them to today's > date, as well do stuff like date += 2 months. > > How do I do it? As the other ones already has said, use the Date:: modules for manipulation. However, if y

again me "kasi":a though question of using variable in pattern

2003-02-05 Thread kasi ramanathen
by using this code i get the right answer, but i want to store the pattern in the variable and use it, for pattern, it fails. what is the problem. is it related to priority of operator. open(IH, "); $v=join(' ',@a); while($v=~m/href=\"(.*?)\">/gi) { print "\n$1"; print 1; } ***

Re: Net::FTP troubles

2003-02-05 Thread R. Joseph Newton
"Caenepeel, Sean [R&D/0111]" wrote: > Hello, > > I am having some difficulty downloadinging a file with the Net::FTP module. > ... > $ftp->cwd($path) || > die "Could not cd to $path."; > $ftp->get($filename) || > die "Could not get file."; HI Sean, I haven't worked with this module, but

RE: Another threading question

2003-02-05 Thread Beau E. Cox
Hi dan - > -Original Message- > From: dan [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, February 05, 2003 12:43 PM > To: [EMAIL PROTECTED] > Subject: Another threading question > > > Hey again, > > I managed to get my thread doing timeouts, thanks to everyone who > helped me. > Now I ha

a though question of using variable in pattern

2003-02-05 Thread kasi ramanathen
by using this code i get the right answer, but i want to store the pattern in the variable and use it, for pattern, it fails. what is the problem. is it related to priority of operator. open(IH, "); $v=join(' ',@a); while($v=~m/href=\"(.*?)\">/gi) { print "\n$1"; print 1; } ***

RE: use as configuration language

2003-02-05 Thread Shaw, Steven
> Well, since you mention that Freezethaw wasn't available, I assume > installing from CPAN isn't an option - if it is, you could check out > YAML: > > http://perladvent.org/2002/15th/ Thanks, Robin. This is an excellent reference for me. It shows me how to use eval to get the data back (and slu

Re: use as configuration language

2003-02-05 Thread Robin Norwood
"Shaw, Steven" <[EMAIL PROTECTED]> writes: > Thanks. I looked at Storable and Freezethaw (they are also refered to in that doco I >was looking at above). Freezethaw wasn't available on my system. Storable used a >binary storage format. What I'm looking for is an editable (text) format - just Per

RE: use as configuration language

2003-02-05 Thread Shaw, Steven
> Shaw, Steven wrote: > > Hi I'm trying to use Perl as a configuration language. I have found > > Data::Dumper. I found some doco here: > > > http://tit.irk.ru/perlbookshelf/advprog/ch10_02.htm#ch10-pgfId-976240 > > [snip] > > > > $file = 'configuration.pl'; > > $result = evaluate_file($

Re: use as configuration language

2003-02-05 Thread Wiggins d'Anconia
Shaw, Steven wrote: Hi I'm trying to use Perl as a configuration language. I have found Data::Dumper. I found some doco here: http://tit.irk.ru/perlbookshelf/advprog/ch10_02.htm#ch10-pgfId-976240 Here it talks about how to dump out complex data structures and mentions eval. What I don't unders

RE: How to send an e-mail from perl script on windows using SMTP?

2003-02-05 Thread Timothy Johnson
Assuming that ivhpxc0003.ap.bdi.gte.com is your email server, I would first try to do a "telnet ivhpxc0003.ap.bdi.gte.com 25" at the command prompt. If you get a connection refused or denied message, then you will not be able to send the email from your script. -Original Message- From: M

Re: How to send an e-mail from perl script on windows using SMTP?

2003-02-05 Thread Madhu Reddy
I changed to Net::SMTP still i am getting following error Couldnt make Connection: Unknown error --- david <[EMAIL PROTECTED]> wrote: > Madhu Reddy wrote: > > > use NET::SMTP ; > > should probably be: > > use Net::SMTP; > > unless NET::SMTP is a new module. > > david > > -- >

use as configuration language

2003-02-05 Thread Shaw, Steven
Hi I'm trying to use Perl as a configuration language. I have found Data::Dumper. I found some doco here: http://tit.irk.ru/perlbookshelf/advprog/ch10_02.htm#ch10-pgfId-976240 Here it talks about how to dump out complex data structures and mentions eval. What I don't understand is how to

Re: How to send an e-mail from perl script on windows using SMTP?

2003-02-05 Thread david
Madhu Reddy wrote: > use NET::SMTP ; should probably be: use Net::SMTP; unless NET::SMTP is a new module. david -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

How to send an e-mail from perl script on windows using SMTP?

2003-02-05 Thread Madhu Reddy
Hi, I want to send an e-mail from perl script i have following script...but i am getting following error. does anybody have any idea, why it is failing ? == following is error message -- Couldnt make Connection: Unknown error --- following is script ===

Re: Modifying the string entered

2003-02-05 Thread R. Joseph Newton
Rob Dixon wrote: > > my ( $path, $file ) = ( $fullpath =~ /(.*)\/(.*)/ ); > Ah, but that would be cracking the egg at the small end, which only a barbarian would do )( ;o }) Joseph -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: doubt in pattern matching using variable

2003-02-05 Thread R. Joseph Newton
kasi ramanathen wrote: > $t="perl"; > while($ln=~m/$t/g) > { > print "it matches.."; > } > Hi Kasi, The part above shoul;d work, because this does: #!/usr/bin/perl -w use strict; my $Test = "Hi"; my $Greeting = "Hi, there. How are you?"; if ($Greeting =~ /$Test/) { print "$Greeting\n";

Re: move data into separate directory

2003-02-05 Thread R. Joseph Newton
Jose Malacara wrote: > foreach my $file (@files) { >my $input="$file"; > > open(INFILE,"$input") || die "Can't open file $input"; #<=== is opening > correct file name, but not 'data/logfile1. I think your problem is here. Presuming that data is a subdirectory of the directory your script

Another threading question

2003-02-05 Thread dan
Hey again, I managed to get my thread doing timeouts, thanks to everyone who helped me. Now I have another dilemma to come across. The timeout sub in the thread successfully does timeouts, and removes them accordingly. However, I need the thread to print to an already open Socket that it has timed

Re: Wroking with Dates

2003-02-05 Thread david
Thomas Williams wrote: > I got dates in the -mm-dd format, and I need to compare them to > today's date, as well do stuff like date += 2 months. > > How do I do it? check out Date::Manip. Example: #!/usr/bin/perl -w use strict; use Date::Manip; my $date1 = ParseDate("2003-02-05"); #-- 02/

RE: Wroking with Dates

2003-02-05 Thread Timothy Johnson
Check out the Date::Calc module. I think it does what you want. -Original Message- From: Thomas Williams [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 05, 2003 2:21 PM To: [EMAIL PROTECTED] Subject: Wroking with Dates I got dates in the -mm-dd format, and I need to compare t

Wroking with Dates

2003-02-05 Thread Thomas Williams
I got dates in the -mm-dd format, and I need to compare them to today's date, as well do stuff like date += 2 months. How do I do it? Tom _ Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=f

RE: how to set up Makefile.pl

2003-02-05 Thread Bob Showalter
Paul Tremblay wrote: > Thanks, but this won't work. I need to open the data file and read > some data. Later in the script, I need to open the data file again > and read more data. When I use , perl apparently reads one > line at a time until it finds what I want. It then starts at the line > I le

Re: how to set up Makefile.pl

2003-02-05 Thread Paul Tremblay
Thanks, but this won't work. I need to open the data file and read some data. Later in the script, I need to open the data file again and read more data. When I use , perl apparently reads one line at a time until it finds what I want. It then starts at the line I left off when I need to read more

Checking for open files with flock

2003-02-05 Thread Lewis, Michael (TBS-TTS)
Hello I have an issue with Solaris 8 and flock. What I'm trying to do is copy files from an ftp dropbox to another directory, but skip open files (files that are currently being ftp'd into the dropbox). Seems that the line : if ( ! (flock(LOCK, LOCK_EX | LOCK_NB))) { close LOCK; migh

Re: move data into separate directory

2003-02-05 Thread Jose Malacara
>opendir(DIR, 'data') ... This allows me to grab the correct file names from within the 'data' directory, but I guess that my problem happens when the script actually goes to parse those files that it only looks for the filenames locally, rather than in the actual 'data' directory. >while ()...

RE: howto: jump from one sub back to another

2003-02-05 Thread wiggins
On Wed, 5 Feb 2003 13:59:08 -0600, "meriwether lewis" <[EMAIL PROTECTED]> wrote: > Hi! > > OK, here goes... > In the middle of sub2 called from sub1, is it > possible to jump back to sub1 right after the > call to sub2 so sub1 can complete? > >

RE: howto: jump from one sub back to another

2003-02-05 Thread Dan Muey
> > > > Hi! > > > > OK, here goes... > > In the middle of sub2 called from sub1, is it > > possible to jump back to sub1 right after the > > Um, yeah unless you exit or die or something like that in sub2. > > Not really sure where you're headed with this question > but see if you can follo

RE: howto: jump from one sub back to another

2003-02-05 Thread Dan Muey
> Hi! > > OK, here goes... > In the middle of sub2 called from sub1, is it > possible to jump back to sub1 right after the Um, yeah unless you exit or die or something like that in sub2. Not really sure where you're headed with this question but see if you can follow what's happening below

Net::Jabber module

2003-02-05 Thread Julien Motch
Hi All I have some problem using the Net::Jabber .From my perl prog side ,everything seems ok ,I check the reurn values of the functions which tell me that I am connected an authentificated .But from the server side,I have a login fail in the error.log file .If anybody has already experienced

Re: howto: jump from one sub back to another

2003-02-05 Thread Jenda Krynicky
From: "meriwether lewis" <[EMAIL PROTECTED]> > OK, here goes... > In the middle of sub2 called from sub1, is it > possible to jump back to sub1 right after the > call to sub2 so sub1 can complete? perldoc -f return ? Jenda = [EMAIL PROTECTED] === http://Jenda.Krynicky.cz = When

howto: jump from one sub back to another

2003-02-05 Thread meriwether lewis
Hi! OK, here goes... In the middle of sub2 called from sub1, is it possible to jump back to sub1 right after the call to sub2 so sub1 can complete? Thanks! Mark -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Net::FTP troubles

2003-02-05 Thread
Hello, I am having some difficulty downloadinging a file with the Net::FTP module. When I run the following test script I am able to download a file that appears to be slightly smaller than the file on the FTP site. In addition, when I 'gunzip' the file I get the following error: gunzip: gbest1.

Re: lstat($_)->mtime fails

2003-02-05 Thread Arild Jensen
On Tue, 4 Feb 2003, Wiggins d'Anconia wrote: > Arild Jensen wrote: > > I am trying to get the mtime of a bunch of files and directores. However, > > it fails after the first two files/dirs. I don't see why it should. I am > > an experienced sysadmin and a beginner Perl coder (obviously). > > >

Re: Modifying the string entered

2003-02-05 Thread Rob Dixon
R. Joseph Newton wrote: > debraj bhattacharyya wrote: > >> Hi >> I am facing a problem .In one script ,it asks the user to enter a >> filename ,where the whole path can also be entered.For Example : >> >> Enter the FILENAME : /usr/bin/xyz.sql >> >> My question is how to separate the directory path

Re: How do I include a bmp or gif file in my TK code

2003-02-05 Thread zentara
On Wed, 05 Feb 2003 08:28:43 -0500, [EMAIL PROTECTED] (Zentara) wrote: >>I have some code using TK. I used perlapp to compile my code, but the >>external images will not compile into the exe file. >>How can I include them in the compiler or how can I embed the image within >>my perl code ? >> >>$

Re: lstat($_)->mtime fails

2003-02-05 Thread Rob Dixon
Arild Jensen wrote: > I am trying to get the mtime of a bunch of files and directores. > However, it fails after the first two files/dirs. I don't see why it > should. I am an experienced sysadmin and a beginner Perl coder > (obviously). > > #!/usr/bin/perl -w > > use strict; > use File::Find; > us

Re: regarding log() function

2003-02-05 Thread Pete Emerson
You probably have the module you need already installed. I did it successfully like this: perl -e 'use Math::Complex; print log(-2.8e-05);' On Wed, 2003-02-05 at 11:41, [EMAIL PROTECTED] wrote: > hi all, > i am using perl 5.8.0 on ix86. i was using an inbuilt function log(). > i am not able to g

Re: perl4 vs. perl5

2003-02-05 Thread Randal L. Schwartz
> "Peter" == Peter Scott <[EMAIL PROTECTED]> writes: Peter> Slap all that into a PowerPoint presentation and you're done :-) Beware the antipower of Powerpoint: -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 <[EMAIL PROT

regarding log() function

2003-02-05 Thread km
hi all, i am using perl 5.8.0 on ix86. i was using an inbuilt function log(). i am not able to get the log value of the following number at the command line using : print -e 'print log(-2.8e-05);' -- it says : Can't take log of -2.83e-05 at -e line 1. -- how do i solve it ? do i have to install

RE: perl4 vs. perl5

2003-02-05 Thread Peter Scott
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Jensen Kenneth B Sra Afpc/Dpdmpq) writes: >Little more background,... I just PCS'd to this organization last September, >coming from a previous assignment where the systems were actually up to date >(kind of, purl 5.6.1) . Started learning the sys

RE: Removal

2003-02-05 Thread Dan Muey
Send an email from the subscribed account to [EMAIL PROTECTED] > > Please stop sending me email.. > > Thanks > > > __ > The NEW Netscape 7.0 browser is now available. Upgrade now! > http://channels.netscape.com/ns/browsers/dow

Re: Can anyone suggest me a resolution/ alternate appraoch ...( memory leak issue with perl_eval_sv api)

2003-02-05 Thread Paul Johnson
[EMAIL PROTECTED] said: Hardly a beginners question :-) But anyway: > Hi , > I found memory leak with the perl API "perl_eval_sv" . > Iam attaching the c code that i used as a sample to come to the > conclusion that the > api "perl_eval_sv" has got memory lea

Removal

2003-02-05 Thread clemstop
Please stop sending me email.. Thanks __ The NEW Netscape 7.0 browser is now available. Upgrade now! http://channels.netscape.com/ns/browsers/download.jsp Get your own FREE, personal Netscape Mail account today at http://webmail.

Re: Modifying the string entered

2003-02-05 Thread R. Joseph Newton
debraj bhattacharyya wrote: > Hi > I am facing a problem .In one script ,it asks the user to enter a filename ,where >the whole path can also be entered.For Example : > > Enter the FILENAME : /usr/bin/xyz.sql > > My question is how to separate the directory path from the filename ,store it in >d

RE: Mail::Sender ads .dat extension

2003-02-05 Thread Dan Muey
That was exactly it! Works like a bandit! Thank you so much Jenda, I owe you one, actually more like two or three. Your module rocks! Genius of the day goes to you today!! Dan > > > From: "Dan Muey" <[EMAIL PROTECTED]> > > I have a script that generates a pdf file from html. > > > > It genera

doubt in pattern matching using variable

2003-02-05 Thread kasi ramanathen
hi friends, i have a problem in work i want to use a variable in the place of pattern to be matched, but i don't know how? but some great brain some ware in the world will be knowing it. hear i explain the program, when i use the patter i get the right output when i store it in variable t and

RE: loading file or???

2003-02-05 Thread Dan Muey
Depends on what you are doing with them and what is in them. If they contain perl code then 'require' or 'use' If they contain data to be used then 'open' Perldoc -f open Perldoc -f require Perldoc -f use > > > I my developing a Intrusion Detection System in perl and I > have develop the >

loading file or???

2003-02-05 Thread Benjamin Jeeves
I my developing a Intrusion Detection System in perl and I have develop the main part of the system but I need a way to load all the signature files I have develop in perl into the main program and was hoping that some one can give me a pointer in the right way of doing this. I was think of si

Can anyone suggest me a resolution/ alternate appraoch ...( memory leak issue with perl_eval_sv api)

2003-02-05 Thread mskhan
Hi , I found memory leak with the perl API "perl_eval_sv" . Iam attaching the c code that i used as a sample to come to the conclusion that the api "perl_eval_sv" has got memory leaks . Iam stuck with this . Could you suggest some way out o

Re: how to set up Makefile.pl

2003-02-05 Thread RF
>However, I have several files that need aren't modules but are needed >for my script. One of these is a data file. How do I set up Makefile.pl >to make sure this data file gets put in a place where the script can >read it? The answer verbatim from The Perl Cookbook (http://www.oreilly.com/catalo

Re: How do I include a bmp or gif file in my TK code

2003-02-05 Thread zentara
On Tue, 4 Feb 2003 15:46:31 -0500, [EMAIL PROTECTED] wrote: > >Hello, > >I have some code using TK. I used perlapp to compile my code, but the >external images will not compile into the exe file. >How can I include them in the compiler or how can I embed the image within >my perl code ? > >$img =

Re: Mail::Sender ads .dat extension

2003-02-05 Thread Jenda Krynicky
From: "Dan Muey" <[EMAIL PROTECTED]> > I have a script that generates a pdf file from html. > > It generates it for viewing perfect. > It will email it also. > > However when I email it a .dat extension is added and it won;t work in > Acrobat. I bet it's the mail client who adds the .dat extensi

Re: doubt in pattern matching using variable

2003-02-05 Thread Rob Dixon
Kasi ramanathen wrote: > hi friends, > > i have a problem in work i want to use a variable in the place of > pattern to be matched, but i don't know how? but some great brain > some ware in the world will be knowing it. > > hear i explain the program, when i use the patter i get the right > output

Re: Trouble with referencing hash entry

2003-02-05 Thread Rob Dixon
Karl Kaufman wrote: > Cupie doll for Mr. Pinyan... thanks! > > Both 'length' and (/^\w+$/) indicate an unprintable character in $_. > Now to find out what it is and where it's coming from. (*argh*) Karl. Perl is quite happy indexing a hash with an unprintable character, so it won't cause a hash

Re: matching patterns

2003-02-05 Thread Rob Dixon
Mario Kulka wrote: > I am trying to extract ".jpg" (subtype of the file) from the string: > c:\my_files\file.jpg Two more: $type = (split /\./, $string)[-1]; or ($type) = $s =~ m[.*\.(.*)]; Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PRO

Re: Modifying the string entered

2003-02-05 Thread John W. Krahn
Debraj Bhattacharyya wrote: > > Hi Hello, > I am facing a problem .In one script ,it asks the user to enter a filename ,where > the whole path can also be entered.For Example : > > Enter the FILENAME : /usr/bin/xyz.sql > > My question is how to separate the directory path from the filename ,st

Re: Modifying the string entered

2003-02-05 Thread Janek Schleicher
On Wed, 05 Feb 2003 11:04:34 +0600, Debraj Bhattacharyya wrote: > I am facing a problem .In one script ,it asks the user to enter a > filename ,where the whole path can also be entered.For Example : > > Enter the FILENAME : /usr/bin/xyz.sql > > My question is how to separate the directory path f

Re: Modifying the string entered

2003-02-05 Thread Felix Geerinckx
on Wed, 05 Feb 2003 05:04:34 GMT, [EMAIL PROTECTED] (Debraj Bhattacharyya) wrote: > Enter the FILENAME : /usr/bin/xyz.sql > > My question is how to separate the directory path from the > filename ,store it in different variables and then go to that > particular directory to look for the file ?

Re: how to test for numeric user input?

2003-02-05 Thread Felix Geerinckx
on Wed, 05 Feb 2003 06:52:18 GMT, [EMAIL PROTECTED] (Gary Merrick) wrote: > I need to somehow test for user input being > numeric. I think. <:-) This is a frequently asked question: perldoc -q number/whole > my $input = 'undef'; Here you are putting the literal string 'undef' into $inp

Re: how to test for numeric user input?

2003-02-05 Thread Lance
You are probably going to have to loop through the list, looking in it for the data input: my $input = 'undef'; my @possible_list = ('one', 'two','three'); until ($input eq "exit") { print "\nPlease type one of @possible_list "; chomp ($input = ); foreach my $entry( @possible_list )

RE: matching patterns

2003-02-05 Thread yargo
or just : my $String = "c:\my_files\file.jpg"; my (undef, $Ext) = (split /\./, $String); -Original Message- From: mario kulka [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 04, 2003 8:30 PM To: [EMAIL PROTECTED] Subject: matching patterns I am trying to extract ".jpg" (subtype of

RE: system() call fails

2003-02-05 Thread yargo
I'd try : @MakeCmd = ("nmake", "-f", "Nmakefile.mak"); $rc = system(join " ",@MakeCmd); -Original Message- From: meriwether lewis [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 05, 2003 7:17 AM To: [EMAIL PROTECTED] Subject: system() call fails Hi Gurus! I'm running Perl 5.004_04

Modifying the string entered

2003-02-05 Thread debraj bhattacharyya
Hi I am facing a problem .In one script ,it asks the user to enter a filename ,where the whole path can also be entered.For Example : Enter the FILENAME : /usr/bin/xyz.sql My question is how to separate the directory path from the filename ,store it in different variables and then go to that p

Re: how to test for numeric user input?

2003-02-05 Thread John W. Krahn
Gary Merrick wrote: > > I'm taking a beginning Perl class, and we haven't gotten to pattern matching > yet. I need to somehow test for user input being numeric. I think. <:-) This is a Frequently Asked Question that can be found in the documentation that was installed with Perl. perldoc -q "H

doubt in pattern matching using variable

2003-02-05 Thread kasi ramanathen
hi friends, i have a problem in work i want to use a variable in the place of pattern to be matched, but i don't know how? but some great brain some ware in the world will be knowing it. hear i explain the program, when i use the patter i get the right output when i store it in variable t and