RE: running a short perl script in a windows XP arena

2005-12-29 Thread Timothy Johnson
Try printing out the result of the variables you are creating. Maybe I'm just not getting what you're trying to do, but I don't think it's doing what you think it's doing. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 28, 2005 3:48 PM

RE: getting a time diff from strings

2005-12-29 Thread Timothy Johnson
Check out the Time::Local module. -Original Message- From: Robert [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 28, 2005 6:19 PM To: beginners@perl.org Subject: getting a time diff from strings I have a log that I am parsing and I can get the login and logout time string parsed

Re: Each char / letter -- array from string value

2005-12-29 Thread Dr.Ruud
Chris Devers: $ perl -le '$i = abcd; @j = split //, $i; print join \n, @j;' A good alternative to [print join \n, @list] is to set the output field separator (see perldoc perlvar) to \n. perl -le $,=qq{\n}; print split //, q{abcd} The qq{} is to make it work under CMD.EXE too, the q{abcd}

strange problem with STDIN- need help

2005-12-29 Thread Poonam Pahil
Hi, Iam using STDIN to accept user input but the script just hangs at that point. I type in the value program is just stuck at that point. i know its got to do with buffer flushing. when iam using the same piece of code at the beginning of the script everything works fine. iam using system() a

Re: getting a time diff from strings

2005-12-29 Thread Gerard Robin
On Wed, Dec 28, 2005 at 09:18:55PM -0500, Robert wrote: From: Robert [EMAIL PROTECTED] To: beginners@perl.org Subject: getting a time diff from strings I have a log that I am parsing and I can get the login and logout time string parsed out. It looks like this: 13:50:01# this is the

Re: strange problem with STDIN- need help

2005-12-29 Thread Owen Cook
On Thu, 29 Dec 2005, Poonam Pahil wrote: Iam using STDIN to accept user input but the script just hangs at that point. I type in the value program is just stuck at that point. i know its got to do with buffer flushing. when iam using the same piece of code at the beginning of the script

Re: strange problem with STDIN- need help

2005-12-29 Thread Poonam Pahil
if($remove_CS =~ m/n/i ){ ??? } it does not reach to this point. it hangs before this, at my $remove_CS = STDIN; thanks poonam On 12/29/05, Owen Cook [EMAIL PROTECTED] wrote: On Thu, 29 Dec 2005, Poonam Pahil wrote: Iam using STDIN to accept user input but the script just hangs at

Re: strange problem with STDIN- need help

2005-12-29 Thread Owen Cook
On Thu, 29 Dec 2005, Poonam Pahil wrote: if($remove_CS =~ m/n/i ){ ??? } it does not reach to this point. it hangs before this, at my $remove_CS = STDIN; Well this works for me cut #!/usr/bin/perl -w use strict; print Do you

Re: strange problem with STDIN- need help

2005-12-29 Thread Dr.Ruud
Poonam Pahil schreef: Iam using STDIN to accept user input but the script just hangs at that point. perldoc -q waiting -- Affijn, Ruud Gewoon is een tijger. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: why a.pl is faster than b.pl

2005-12-29 Thread Bob Showalter
Jeff Pang wrote: Hi,bob, You said: 3. It will probably be faster to use a single regex of the format: /pata|patb|patc|patd/ In fact maybe you are wrong on this. Darn. First time this year :-) Based on my test case,the RE written as below: /pata/ || /patb/ || /patc/ || /patd/ is

Re: why a.pl is faster than b.pl

2005-12-29 Thread Chris Devers
On Thu, 29 Dec 2005, Bob Showalter wrote: Jeff Pang wrote: Hi,bob, You said: 3. It will probably be faster to use a single regex of the format: /pata|patb|patc|patd/ In fact maybe you are wrong on this. Darn. First time this year :-) Based on my test case,the

Re: getting a number out of a string....

2005-12-29 Thread David Gilden
Chris, Thanks and Happy New Year. Dave (kora musician / audiophile / webmaster @ www.coraconnection.com / Ft. Worth, TX, USA) How does one just get the number part out of a string? The script below just prints 1. Right. All it's doing is reporting a successful, true, match. You

Re: getting a time diff from strings

2005-12-29 Thread Robert Hicks
Thanks! Robert -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response

perl net ftp on windows

2005-12-29 Thread DBSMITH
I cannot figure out how Net::FTP set its local current directory for gets of remote files? Does anyone know? I want to get remotefile from remotehost using: but I want to place this file in $localdir not in what Net::FTP claims to be get ( REMOTE_FILE [, LOCAL_FILE [, WHERE]] ) Get

regular expression

2005-12-29 Thread Krishna . Thotakura
I am looking for help on a PERL regular expression that can do the following: 1. Make sure that the string is 20 chars or else match should fail. 2. The string can have word characters or spaces or comma(,), hyphen(-), ampersand() characters. 3. If the string contains only spaces, then match

Re: regular expression

2005-12-29 Thread John W. Krahn
[EMAIL PROTECTED] wrote: I am looking for help on a PERL regular expression that can do the following: 1. Make sure that the string is 20 chars or else match should fail. 2. The string can have word characters or spaces or comma(,), hyphen(-), ampersand() characters. 3. If the string

Re: graf-code

2005-12-29 Thread S Khadar
Hi all, :) I have done atlast - i used Image::Magick to generate my static - data set - including curve and a small PERL script will do the reading and plotting of the points. But, still the annotation is not working on my server and pc :( #29/12/2005 # [EMAIL PROTECTED] #!/usr/bin/perl use

Re: regular expression

2005-12-29 Thread Krishna . Thotakura
Although, i read about negated versions of lookahead and lookbehind operators, i didnt really understand how to use them. Now, i get it. Thanks John. John W. Krahn [EMAIL PROTECTED] 12/29/2005 12:47 PM To: Perl Beginners beginners@perl.org cc: Subject:

using an system call for decryption

2005-12-29 Thread DBSMITH
All, I am using gpg ( opensource encryption/decryption tool) to send files via ftp to a remote site. In my WIN32 Perl program I am trying to figure how I would do this equivalent in Unix... # cat gpgpass |gpg - - all the options newfile encryptedfile The gpgpass is the password that will enable

RE: regular expression

2005-12-29 Thread Charles K. Clarkson
[EMAIL PROTECTED] wrote: : Any ideas on how this can be done using just one regular : expression ? I'm curious, why one regex? Is this for a non-perl application? Charles K. Clarkson -- Mobile Homes Specialist 254 968-8328 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For

for send an email part II

2005-12-29 Thread Rafael Morales
Well I have done this code, but the messages arrive in white :(, anybody could help me with this please ???. Note: I do not know the list of users for that reason I need multipart. Regards #!/usr/bin/perl use strict; use warnings; my $msg_html = message.html; my $msg_txt =

Re: for send an email part II

2005-12-29 Thread Dr.Ruud
Rafael Morales: Well I have done this code, but the messages arrive in white There should be at least one empty line between header and body, so add a \n somewhere. -- Affijn, Ruud Gewoon is een tijger. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

Re: Reading the built-in number variables

2005-12-29 Thread Don VanSyckel
The approach of using list context for the match and the array slice: my @fields = $data =~ m/^(\S+)\s+((\S+\s+)?(\S+))$/; @values = @[EMAIL PROTECTED]; is exactly what I needed. I still can't find this referenced in the docs though. Thanks, Don On Tuesday 20 December 2005 09:30, Bob

Re: Re: for send an email part II

2005-12-29 Thread Rafael Morales
I have added the \n, however the mails are still arriving empty :( I did .. print MAIL Subject: $Subject; print MAIL \n\n;-- This line I have added my $correo = MAIL_BODY; $boundary .. Text here .. $boundary MAIL_BODY - Original Message - From: Dr.Ruud [EMAIL

Re: for send an email part II

2005-12-29 Thread Rafael Morales
Yes, and I did that, my first choice was to use Mail::Sendmail, however it does not work fine with Yahoo, because the mails arrive empty. But I will play with the choices you have given me. Thanks and regards !!! - Original Message - From: Jenda Krynicky [EMAIL PROTECTED] To: Rafael

RE: strange problem with STDIN- need help

2005-12-29 Thread Timothy Johnson
Try adding this line to the top of your script: $| = 1; This sets STDOUT to autoflush the buffer. You may be trying to print something that just isn't showing up. -Original Message- From: Poonam Pahil [mailto:[EMAIL PROTECTED] Sent: Thursday, December 29, 2005 2:23 AM To:

Plotting a 2D chart

2005-12-29 Thread Aditi Gupta
Hello Everybody, I have a perl code which produces a string of numbers as output. I want to plot this data on an x-y axes plane. I'm using ActiveState Perl 5.8.6 on a Windows XP platform. Since I don't have direct internet connection, I'm unable to use the online package repositories for