how to accept https certificate?
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 it the correct way? Thanks for every reply! lee -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/
How can we Install Perl in Windows
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/
Re: How can we Install Perl in Windows
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 PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > http://learn.perl.org/ > > > Hi ! Use ActiveState of windows . http://www.activestate.com/Products/activeperl/index.mhtml . Note :- I just don't want to be controversial or raise controversies but I feel that before posting the query on the mailing list, at least proper efforts should be spent on the search engine of your choice. I am not discouraging anybody from posting there queries on perl, all the members in this mailing list are here to learn and simultaneously help others but everybody expects the person who raises the query to do some initial basic searching on the internet. Have said that, in case you have more queries, send it to the mailing list. Regards, Amit Saxena
Re: A newbie question - line number inside the script
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 PROTECTED]> wrote: > > > On Wed, Jul 16, 2008 at 3:52 PM, Amit Koren <[EMAIL PROTECTED]> > wrote: > >> Hi list. >> >> I'm a newbie to Perl, (and to this mailing list) :) >> There's a task i was given, in which it is necessary to get the >> number of the current executing line/command - inside the script itself. >> >> Can someone assist please ? >> >> Thanks in advance, >> >> Amit. >> > > If you are referring to process ID by "number", you can use $$ for that. > > Regards, > Amit Saxena >
RE: How can we Install Perl in Windows
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:[EMAIL PROTECTED] Sent: Thursday, July 17, 2008 12:54 PM To: Perl Subject: How can we Install Perl in Windows 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/ http://www.patni.com World-Wide Partnerships. World-Class Solutions. _ This e-mail message may contain proprietary, confidential or legally privileged information for the sole use of the person or entity to whom this message was originally addressed. Any review, e-transmission dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you have received this e-mail in error kindly delete this e-mail from your records. If it appears that this mail has been forwarded to you without proper authority, please notify us immediately at [EMAIL PROTECTED] and delete this mail. _ -- 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
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 download? -- 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
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 > 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 download? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://www.patni.com World-Wide Partnerships. World-Class Solutions. _ This e-mail message may contain proprietary, confidential or legally privileged information for the sole use of the person or entity to whom this message was originally addressed. Any review, e-transmission dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you have received this e-mail in error kindly delete this e-mail from your records. If it appears that this mail has been forwarded to you without proper authority, please notify us immediately at [EMAIL PROTECTED] and delete this mail. _ -- 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
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 vendor to verify that this is a valid Windows Installer Package.'' -- 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
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, July 17, 2008 2:42 PM To: sanket vaidya Cc: 'Perl' Subject: Re: How can we Install Perl in Windows 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.1 003-MSWin32-x86-285500.msi and tried to install, it says ''This installation page could not be opened.Contact the Application vendor to verify that this is a valid Windows Installer Package.'' -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://www.patni.com World-Wide Partnerships. World-Class Solutions. _ This e-mail message may contain proprietary, confidential or legally privileged information for the sole use of the person or entity to whom this message was originally addressed. Any review, e-transmission dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you have received this e-mail in error kindly delete this e-mail from your records. If it appears that this mail has been forwarded to you without proper authority, please notify us immediately at [EMAIL PROTECTED] and delete this mail. _ -- 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
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 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
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"; > print STDERR "This is STDERR\n"; > print STDOUT "This is STDOUT\n"; > # > > I thought the result shoud be > -- > This is STDOUT > This is STDERR > This is STDOUT > -- > > but the actual result is > -- > This is STDERR > This is STDOUT > This is STDOUT > -- > > Then I set $| = 1; > the result became > -- > This is STDERR > This is STDOUT > This is STDOUT > -- > > I also tried set autoflush > STDOUT->autoflush(1); > STDERR->autoflush(1); > > But I can not get the result as I expected. > Anyone know what's up? > > Thank you. Other than the fact that it works fine for me, STDERR and STDOUT are two separate streams. They can experience delays between being written to and having the message appear on the terminal, assuming that is where you are viewing the two. I don't think there is any guaranty of order between the two. You can pipe the two streams to two separate files or timestamp the output... -- 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
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: How can we Install Perl in Windows
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 are using it with ActiveState rather than Cygwin. I might be wrong though. Regards, Amit Saxena
RE: How can we Install Perl in Windows
[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/
how do you do this in one step instead of two
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://learn.perl.org/
Re: how do you do this in one step instead of two
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, [$direction, $source]; -- Regards, Jeff. - [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/
Re: how do you do this in one step instead of two
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, [$direction, $source]; -- Regards, Jeff. - [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/
RE: how do you do this in one step instead of two
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, [$direction, $source]; -- Regards, Jeff. - [EMAIL PROTECTED] Is that creating an "anonymous reference" ? Ta Stewart Information in this email including any attachments may be privileged, confidential and is intended exclusively for the addressee. The views expressed may not be official policy, but the personal views of the originator. If you have received it in error, please notify the sender by return e-mail and delete it from your system. You should not reproduce, distribute, store, retransmit, use or disclose its contents to anyone. Please note we reserve the right to monitor all e-mail communication through our internal and external networks. SKY and the SKY marks are trade marks of British Sky Broadcasting Group plc and are used under licence. British Sky Broadcasting Limited (Registration No. 2906991), Sky Interactive Limited (Registration No. 3554332), Sky-In-Home Service Limited (Registration No. 2067075) and Sky Subscribers Services Limited (Registration No. 2340150) are direct or indirect subsidiaries of British Sky Broadcasting Group plc (Registration No. 2247735). All of the companies mentioned in this paragraph are incorporated in England and Wales and share the same registered office at Grant Way, Isleworth, Middlesex TW7 5QD. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/
Re: how do you do this in one step instead of two
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, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/
perl error...
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/Copy.pm installed... and am using cooresponding /usr/pkg/bin/perl what could be the problem? // George -- George Georgalis, information system scientist < -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/
Re: how do you do this in one step instead of two
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 array, more exactly. -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/
Re: perl error...
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); >use File::Path qw(mkpath); > >I do have a nice /usr/pkg/lib/perl5/5.8.0/File/Copy.pm installed... >and am using cooresponding /usr/pkg/bin/perl > >what could be the problem? BTW original programm is at unreliable site, but I've mirrored it here: http://galis.org/pub/src/contrib/maildirsync/ // George -- George Georgalis, information system scientist < -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/
Re: perl error...
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/pkg/lib/perl5/5.8.0/File/Copy.pm installed... and am using cooresponding /usr/pkg/bin/perl what could be the problem? perldoc perldiag [ snip ] %s: Command not found (A) You’ve accidentally run your script through csh instead of Perl. Check the #! line, or manually feed your script into Perl yourself. [ snip ] %s: not found (A) You’ve accidentally run your script through the Bourne shell instead of Perl. Check the #! line, or manually feed your script into Perl yourself. Make sure that the very first line of your program is: #!/usr/pkg/bin/perl John -- Perl isn't a toolbox, but a small machine shop where you can special-order certain sorts of tools at low cost and in short order.-- Larry Wall -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/
Re: how do you do this in one step instead of two
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 \($direction,$source) doesn't seem to work.. or not the samething That pushes references to the two scalars onto @hh. > push @hh, [$direction, $source]; Doesn't quite do the same thing, unless there was the equivalent of @array = () on the previous line. -- Paul Johnson - [EMAIL PROTECTED] http://www.pjcj.net -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/
Re: perl error...
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; >> use File::Copy qw(copy move); >> use File::Path qw(mkpath); >> >> I do have a nice /usr/pkg/lib/perl5/5.8.0/File/Copy.pm installed... >> and am using cooresponding /usr/pkg/bin/perl >> >> what could be the problem? > > perldoc perldiag > > [ snip ] > > %s: Command not found > (A) You?ve accidentally run your script through csh instead of > Perl. Check the #! line, or manually feed your script into Perl > yourself. > > [ snip ] > > %s: not found > (A) You?ve accidentally run your script through the Bourne shell > instead of Perl. Check the #! line, or manually feed your > script into Perl yourself. > > > > Make sure that the very first line of your program is: > > #!/usr/pkg/bin/perl > oh excellent, thanks. I had a typo in my 'which perl' command :) // George -- George Georgalis, information system scientist < -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/
HTML::TreeBuilder help
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 if there is a more appropriate list for this question I apologize and if you share it with me I'll know next time. Thanks! -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/
Re: HTML::TreeBuilder help
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 the > element I want? > > Also if there is a more appropriate list for this question I apologize > and if you share it with me I'll know next time. my $table = $tree->address('0.1.1.0.1.0.0.0.0.1'); And this list is fine :) Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/
LWP
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 constant URL => 'http://presto.capricorn.com/'; use constant APACHECTL => '/usr/local/apache/bin/apachectl'; $MAIL = '/usr/sbin/sendmail'; $MAIL_FLAGS= '-t -oi'; $WEBMASTER = '[EMAIL PROTECTED]'; head(URL) || resurrect(); sub resurrect { open (STDOUT,"| $MAIL $MAIL_FLAGS") || die "mail: $!"; select STDOUT; $| = 1; open (STDERR,">&STDOUT"); my $date = localtime(); print < Subject: Web server is down I tried to call the Web server at $date but there was no answer. I am going to try to resurrect it now: Mumble, mumble, mumble, shaa! END ; system APACHECTL,'restart'; print
Re: Character Set list
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 for the explaination, I will try to test it in both server to see what I can get. Anyway, other than remote username, can we can remote domain as well? Thanks Leo. -- 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
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. > > > # > > print STDOUT "This is STDOUT\n"; > > print STDERR "This is STDERR\n"; > > print STDOUT "This is STDOUT\n"; > > # > > > I thought the result shoud be > > -- > > This is STDOUT > > This is STDERR > > This is STDOUT > > -- > > > but the actual result is > > -- > > This is STDERR > > This is STDOUT > > This is STDOUT > > -- > > > Then I set $| = 1; > > the result became > > -- > > This is STDERR > > This is STDOUT > > This is STDOUT > > -- > > > I also tried set autoflush > > STDOUT->autoflush(1); > > STDERR->autoflush(1); > > > But I can not get the result as I expected. > > Anyone know what's up? > > > Thank you. > > Other than the fact that it works fine for me, STDERR and STDOUT are > two separate streams. They can experience delays between being written > to and having the message appear on the terminal, assuming that is > where you are viewing the two. I don't think there is any guaranty of > order between the two. You can pipe the two streams to two separate > files or timestamp the output... Hi yitzle Thank you for your kind help. I think timestamp is a good idea. Actually, the code is used for logging. And I will change STDERR output to STDOUT output, adding timestamp and some flags to identify error lines. Thank you. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/
Extract the desired value from a regex
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, Manasi Bopardikar|s/w Engineer|Persistent SystemsLtd (+91)(020)(30234497)|9767218759 [EMAIL PROTECTED] DISCLAIMER == This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Ltd. does not accept any liability for virus infected mails.
RE: Extract the desired value from a regex
$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- From: Manasi Bopardikar [mailto:[EMAIL PROTECTED] Sent: Friday, July 18, 2008 9:22 AM To: beginners@perl.org Subject: Extract the desired value from a regex 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, Manasi Bopardikar|s/w Engineer|Persistent SystemsLtd (+91)(020)(30234497)|9767218759 [EMAIL PROTECTED] DISCLAIMER == This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Ltd. does not accept any liability for virus infected mails. http://www.patni.com World-Wide Partnerships. World-Class Solutions. _ This e-mail message may contain proprietary, confidential or legally privileged information for the sole use of the person or entity to whom this message was originally addressed. Any review, e-transmission dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you have received this e-mail in error kindly delete this e-mail from your records. If it appears that this mail has been forwarded to you without proper authority, please notify us immediately at [EMAIL PROTECTED] and delete this mail. _ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/
RE: Extract the desired value from a regex
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 capture? Thanks & Regards, Sanket Vaidya Patni Computer Systems Limited -Original Message- From: Manasi Bopardikar [mailto:[EMAIL PROTECTED] Sent: Friday, July 18, 2008 9:52 AM To: 'sanket vaidya' Subject: RE: Extract the desired value from a regex Can you please explain it a little more/ -Original Message- From: sanket vaidya [mailto:[EMAIL PROTECTED] Sent: Friday, July 18, 2008 9:47 AM To: 'Manasi Bopardikar' Cc: beginners@perl.org Subject: RE: Extract the desired value from a regex $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- From: Manasi Bopardikar [mailto:[EMAIL PROTECTED] Sent: Friday, July 18, 2008 9:22 AM To: beginners@perl.org Subject: Extract the desired value from a regex 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, Manasi Bopardikar|s/w Engineer|Persistent SystemsLtd (+91)(020)(30234497)|9767218759 [EMAIL PROTECTED] DISCLAIMER == This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Ltd. does not accept any liability for virus infected mails. http://www.patni.com World-Wide Partnerships. World-Class Solutions. _ This e-mail message may contain proprietary, confidential or legally privileged information for the sole use of the person or entity to whom this message was originally addressed. Any review, e-transmission dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you have received this e-mail in error kindly delete this e-mail from your records. If it appears that this mail has been forwarded to you without proper authority, please notify us immediately at [EMAIL PROTECTED] and delete this mail. _ DISCLAIMER == This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Ltd. does not accept any liability for virus infected mails. http://www.patni.com World-Wide Partnerships. World-Class Solutions. _ This e-mail message may contain proprietary, confidential or legally privileged information for the sole use of the person or entity to whom this message was originally addressed. Any review, e-transmission dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you have received this e-mail in error kindly delete this e-mail from your records. If it appears that this mail has been forwarded to you without proper authority, please notify us immediately at [EMAIL PROTECTED] and delete this mail. _ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/
RE: Extract the desired value from a regex
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 -Original Message- From: Manasi Bopardikar [mailto:[EMAIL PROTECTED] Sent: Friday, July 18, 2008 10:06 AM To: 'sanket vaidya' Subject: RE: Extract the desired value from a regex String is M W 8:00AM - 10:20 I want to put M,W in days array 8:00AM - 10:20 in the time array Thanks -Original Message- From: sanket vaidya [mailto:[EMAIL PROTECTED] Sent: Friday, July 18, 2008 9:58 AM To: 'Manasi Bopardikar' Cc: beginners@perl.org Subject: RE: Extract the desired value from a regex 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 capture? Thanks & Regards, Sanket Vaidya Patni Computer Systems Limited -Original Message- From: Manasi Bopardikar [mailto:[EMAIL PROTECTED] Sent: Friday, July 18, 2008 9:52 AM To: 'sanket vaidya' Subject: RE: Extract the desired value from a regex Can you please explain it a little more/ -Original Message- From: sanket vaidya [mailto:[EMAIL PROTECTED] Sent: Friday, July 18, 2008 9:47 AM To: 'Manasi Bopardikar' Cc: beginners@perl.org Subject: RE: Extract the desired value from a regex $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- From: Manasi Bopardikar [mailto:[EMAIL PROTECTED] Sent: Friday, July 18, 2008 9:22 AM To: beginners@perl.org Subject: Extract the desired value from a regex 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, Manasi Bopardikar|s/w Engineer|Persistent SystemsLtd (+91)(020)(30234497)|9767218759 [EMAIL PROTECTED] DISCLAIMER == This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Ltd. does not accept any liability for virus infected mails. http://www.patni.com World-Wide Partnerships. World-Class Solutions. _ This e-mail message may contain proprietary, confidential or legally privileged information for the sole use of the person or entity to whom this message was originally addressed. Any review, e-transmission dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you have received this e-mail in error kindly delete this e-mail from your records. If it appears that this mail has been forwarded to you without proper authority, please notify us immediately at [EMAIL PROTECTED] and delete this mail. _ DISCLAIMER == This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Ltd. does not accept any liability for virus infected mails. http://www.patni.com World-Wide Partnerships. World-Class Solutions. _ This e-mail message may contain proprietary, confidential or legally privileged information for the sole use of the person or entity to whom this message was originally addressed. Any review, e-transmission dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you have received this e-mail in error kindly delete this e-mail from your records. If it appears that this mail has bee
RE: LWP
[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; # instead of use LWP::Simple; # See LWP::UserAgent manpage for other constructor options my $ua = new LWP::UserAgent(timeout => 60); # Set up the HTTP proxy you're going to use $ua->proxy(['http'], 'http://my.proxy.dom:8001/'); my $realm = 'Whatever the Webserver sends as the login prompt text'; #Set up login credentials $ua->credentials( 'presto.capricorn.com', $realm, $uname, $pass ); my $response = $ua->head( $url ); unless( $response->is_success ){ resurrect(); } HTH, Thomas -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/