RE: LWP

2008-07-17 Thread Thomas Bätzler
[EMAIL PROTECTED] <[EMAIL PROTECTED]> asked: > Can someone assist me in modifying the the script below to support the > following: > > 1)define proxy server > 2)the URL being accessed via LWP is protected, so I need to > specify username/passwd combo This is OTTOMH: use LWP::UserAgent; # instea

RE: Extract the desired value from a regex

2008-07-17 Thread sanket vaidya
Refer this code use warnings; use strict; my $string = "M W 8:00AM - 10:20"; $string =~ /(^M)\s(W)\s(\d{1,2}:\d{2}[A|P]M\s-\s\d{2}:\d{2})/; #print "$1\n$2\n$3" my $time = $3; my $days = join(",",$1,$2); print "time = $3\n"; print "days = $days" Output: time = 8:00AM - 10:20 days = M,W -Ori

RE: Extract the desired value from a regex

2008-07-17 Thread sanket vaidya
You want to capture character "?" means zero or one time repetition. To disable the effect of such characters use \Q & to enable the effect use \E. So try $array[3]=~/[M|T|W|TR|F]\s[M|T|W|TR|F]\s(.*\Q?\E)/; If this doesn't work send the entire string from which you want to capture & what to capt

RE: Extract the desired value from a regex

2008-07-17 Thread sanket vaidya
$1 does not work because you are using metacharacter "?" in regex. Use \Q & \E to capture. Thanks & Regards, Sanket Vaidya Patni Computer Systems Limited A 78/9, GIDC, Electronics Estate Sector - 25, Gandhinagar - 382 016 Gujarat, India Tel: 91-79-23240905 Ext: 243 -Original Message- Fro

Extract the desired value from a regex

2008-07-17 Thread Manasi Bopardikar
Hi, I have a regex --- $array[3]=~/[M|T|W|TR|F]\s[M|T|W|TR|F]\s(.*?)/; I want to extract the value of expression highlighted in red.Is there any way to do it. -I tried $1 does not work.Why doesn't it work I do not understand. Is there any other way to do it. Thanks and Regards, Man

Re: Can not mix output of STDERR and STDOUT

2008-07-17 Thread FixReader
On Jul 17, 9:24 pm, [EMAIL PROTECTED] (Yitzle) wrote: > On Wed, Jul 16, 2008 at 9:01 PM, <[EMAIL PROTECTED]> wrote: > > Hi experts > > When I am using STDERR and STDOUT for mixed output, I found a problem. > > Output of STDERR and STDOUT can not be mixed. > > Here is the snippet. > > > ###

Re: Character Set list

2008-07-17 Thread leolim818
On Jul 17, 9:36 am, [EMAIL PROTECTED] (Thomas Yan) wrote: > Hello, >         How can I view the list of all the character sets supported by Perl? >         Could you tell me if I can find it in perldoc or a url at any > website and where it is? > >         Thanks. > Thomas Hi Mimi and Rob, Thanks

LWP

2008-07-17 Thread wls . admin
Can someone assist me in modifying the the script below to support the following: 1)define proxy server 2)the URL being accessed via LWP is protected, so I need to specify username/passwd combo Thanks in advance, Script: #!/usr/local/bin/perl # script: webLazarus use LWP::Simple; use constan

Re: HTML::TreeBuilder help

2008-07-17 Thread Rob Dixon
Ryan wrote: > > The Dump method gives me this: > cellpadding="0" cellspacing="0" width="100%"> @0.1.1.0.1.0.0.0.0.1 > @0.1.1.0.1.0.0.0.0.1.0 >@0.1.1.0.1.0.0.0.0.1.0.0 > > How can I make use of "@0.1.1.0.1.0.0.0.0.1" if I know that's t

HTML::TreeBuilder help

2008-07-17 Thread Ryan
The Dump method gives me this: cellpadding="0" cellspacing="0" width="100%"> @0.1.1.0.1.0.0.0.0.1 @0.1.1.0.1.0.0.0.0.1.0 @0.1.1.0.1.0.0.0.0.1.0.0 How can I make use of "@0.1.1.0.1.0.0.0.0.1" if I know that's the element I want? Also i

Re: perl error...

2008-07-17 Thread George Georgalis
On Thu 17 Jul 2008 at 10:18:22 AM -0700, John W. Krahn wrote: > George Georgalis wrote: >> Okay perl idiot here... >> use: not found >> /usr/local/script/contrib/maildirsync.pl: 20: Syntax error: "(" unexpected >> >> (nb: "use: not found:") humm, well this is line 19-21 >> >> use File::Basename; >

Re: how do you do this in one step instead of two

2008-07-17 Thread Paul Johnson
On Fri, Jul 18, 2008 at 12:11:51AM +0800, Jeff Peng wrote: > On Fri, Jul 18, 2008 at 12:00 AM, Richard Lee <[EMAIL PROTECTED]> wrote: > > is there way to do this in one step? > > > > push @array, ($direction, $source); > > > >push @hh, [EMAIL PROTECTED] > > > > > > push @hh \($directio

Re: perl error...

2008-07-17 Thread John W. Krahn
George Georgalis wrote: Okay perl idiot here... use: not found /usr/local/script/contrib/maildirsync.pl: 20: Syntax error: "(" unexpected (nb: "use: not found:") humm, well this is line 19-21 use File::Basename; use File::Copy qw(copy move); use File::Path qw(mkpath); I do have a nice /usr/p

Re: perl error...

2008-07-17 Thread George Georgalis
On Thu 17 Jul 2008 at 12:56:41 PM -0400, George Georgalis wrote: >Okay perl idiot here... > >use: not found >/usr/local/script/contrib/maildirsync.pl: 20: Syntax error: "(" unexpected > >(nb: "use: not found:") humm, well this is line 19-21 > >use File::Basename; >use File::Copy qw(copy move); >us

Re: how do you do this in one step instead of two

2008-07-17 Thread Gunnar Hjalmarsson
Jeff Peng wrote: On Fri, Jul 18, 2008 at 12:26 AM, Stewart Anderson <[EMAIL PROTECTED]> wrote: > Jeff Peng wrote: > push @hh, [$direction, $source]; Is that creating an "anonymous reference" ? I think it's an anonymous array, not an anonymous reference. A reference to an anonymous arra

perl error...

2008-07-17 Thread George Georgalis
Okay perl idiot here... use: not found /usr/local/script/contrib/maildirsync.pl: 20: Syntax error: "(" unexpected (nb: "use: not found:") humm, well this is line 19-21 use File::Basename; use File::Copy qw(copy move); use File::Path qw(mkpath); I do have a nice /usr/pkg/lib/perl5/5.8.0/File/Co

Re: how do you do this in one step instead of two

2008-07-17 Thread Jeff Peng
On Fri, Jul 18, 2008 at 12:26 AM, Stewart Anderson <[EMAIL PROTECTED]> wrote: >> > > push @hh, [$direction, $source]; > > Is that creating an "anonymous reference" ? > I think it's an anonymous array, not an anonymous reference. -- Regards, Jeff. - [EMAIL PROTECTED] -- To unsubscribe,

RE: how do you do this in one step instead of two

2008-07-17 Thread Stewart Anderson
On Fri, Jul 18, 2008 at 12:00 AM, Richard Lee <[EMAIL PROTECTED]> wrote: > is there way to do this in one step? > > push @array, ($direction, $source); > >push @hh, [EMAIL PROTECTED] > > > push @hh \($direction,$source) doesn't seem to work.. or not the samething > push @hh, [$direct

Re: how do you do this in one step instead of two

2008-07-17 Thread Jeff Peng
On Fri, Jul 18, 2008 at 12:00 AM, Richard Lee <[EMAIL PROTECTED]> wrote: > is there way to do this in one step? > > push @array, ($direction, $source); > >push @hh, [EMAIL PROTECTED] > > > push @hh \($direction,$source) doesn't seem to work.. or not the samething > push @hh, [$directi

Re: how do you do this in one step instead of two

2008-07-17 Thread Jeff Peng
On Fri, Jul 18, 2008 at 12:00 AM, Richard Lee <[EMAIL PROTECTED]> wrote: > is there way to do this in one step? > > push @array, ($direction, $source); > >push @hh, [EMAIL PROTECTED] > > > push @hh \($direction,$source) doesn't seem to work.. or not the samething > push @hh, [$directi

how do you do this in one step instead of two

2008-07-17 Thread Richard Lee
is there way to do this in one step? push @array, ($direction, $source); push @hh, [EMAIL PROTECTED] push @hh \($direction,$source) doesn't seem to work.. or not the samething -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://l

RE: How can we Install Perl in Windows

2008-07-17 Thread Thomas Bätzler
[EMAIL PROTECTED] wrote: > No one here believes in the CygWin package? Four words: wart on a wart. Cheers, Thomas -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: How can we Install Perl in Windows

2008-07-17 Thread Amit Saxena
On Thu, Jul 17, 2008 at 6:55 PM, yitzle <[EMAIL PROTECTED]> wrote: > No one here believes in the CygWin package? > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > http://learn.perl.org/ > > > I feel for Perl on windows platform, more people a

Re: How can we Install Perl in Windows

2008-07-17 Thread yitzle
No one here believes in the CygWin package? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Can not mix output of STDERR and STDOUT

2008-07-17 Thread yitzle
On Wed, Jul 16, 2008 at 9:01 PM, <[EMAIL PROTECTED]> wrote: > Hi experts > When I am using STDERR and STDOUT for mixed output, I found a problem. > Output of STDERR and STDOUT can not be mixed. > Here is the snippet. > > # > print STDOUT "This is STDOUT\n"; > pr

Re: How can we Install Perl in Windows

2008-07-17 Thread Sivasakthi
sanket vaidya wrote: Open this link: http://www.activestate.com/Products/activeperl/index.mhtml Click on "Get ActivePerl". Follow the procedure for download. Try Downloading "MSI" if u have downloaded "AS package" or vice-versa I can able to installed now..Its working.. Thanks.. -- To un

RE: How can we Install Perl in Windows

2008-07-17 Thread sanket vaidya
Open this link: http://www.activestate.com/Products/activeperl/index.mhtml Click on "Get ActivePerl". Follow the procedure for download. Try Downloading "MSI" if u have downloaded "AS package" or vice-versa -Original Message- From: Sivasakthi [mailto:[EMAIL PROTECTED] Sent: Thursday, J

Re: How can we Install Perl in Windows

2008-07-17 Thread Sivasakthi
sanket vaidya wrote: Yes it is a free download I have downloaded the Active Perl from http://downloads.activestate.com/ActivePerl/Windows/5.10/ActivePerl-5.10.0.1003-MSWin32-x86-285500.msi and tried to install, it says ''This installation page could not be opened.Contact the Application

RE: How can we Install Perl in Windows

2008-07-17 Thread sanket vaidya
Yes it is a free download -Original Message- From: Sivasakthi [mailto:[EMAIL PROTECTED] Sent: Thursday, July 17, 2008 2:14 PM To: sanket vaidya Cc: 'Perl' Subject: Re: How can we Install Perl in Windows sanket vaidya wrote: > Download Latest version of ActivePerl for windows from > htt

Re: How can we Install Perl in Windows

2008-07-17 Thread Sivasakthi
sanket vaidya wrote: Download Latest version of ActivePerl for windows from http://www.activestate.com. Unzip the file. Click on installer.bat & Follow the instructions. You require Apache or IIS only for CGI scripting. You can run other programs without that. is that not a free downlo

RE: How can we Install Perl in Windows

2008-07-17 Thread sanket vaidya
Download Latest version of ActivePerl for windows from http://www.activestate.com. Unzip the file. Click on installer.bat & Follow the instructions. You require Apache or IIS only for CGI scripting. You can run other programs without that. -Original Message- From: Sivasakthi [mailto:[

Re: A newbie question - line number inside the script

2008-07-17 Thread Amit Koren
Amit, Thank you for the quick response. What i actually meant was the line number of the source-script file, that is now being read (executed). This is achieved (so i learned from the list) by the __LINE__ directive. Thanks again. Amit. On Wed, Jul 16, 2008 at 1:24 PM, Amit Saxena <[EMAIL PROTE

Re: How can we Install Perl in Windows

2008-07-17 Thread Amit Saxena
On Thu, Jul 17, 2008 at 12:53 PM, Sivasakthi <[EMAIL PROTECTED]> wrote: > Hi all, > > How can we install perl in windows system? > > Let me know the steps or direct me right document.. > before that is it necessary to installing the IIS? > > Thanks, > Siva > > -- > To unsubscribe, e-mail: [EMAIL

How can we Install Perl in Windows

2008-07-17 Thread Sivasakthi
Hi all, How can we install perl in windows system? Let me know the steps or direct me right document.. before that is it necessary to installing the IIS? Thanks, Siva -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

how to accept https certificate?

2008-07-17 Thread lee . genstore
Hi, When i access a https page via browser, it would ask me whether to accept the certificate. But how can i do with perl? While i need to access my client's https page but received error: 500 Can't connect to .com.my:443 (connect: Connection refused) i use LWP, installed crypt::SSLeay. Is i