Gu, Han wrote:
>
> Still very noob when it comes to perl. Just have a quick question. I am
> trying to match a string that is window's path
>
> Sample,
>
> $s1 = "c:\\log\s1.log";
>
> $s2 = $s1;
>
> If ($s1 =~ m/$s2/i) {
> print "matched\n";
> }
>
> It just wouldn't match. I can pu
Thx Shawn. It's working.
-Original Message-
From: Mr. Shawn H. Corey [mailto:shawnhco...@magma.ca]
Sent: Thursday, December 18, 2008 11:56 AM
To: Gu, Han
Cc: 'beginners@perl.org'
Subject: RE: Trying to match window's path
On Thu, 2008-12-18 at 11:40 -0500, Gu, Han wrote:
> Another questio
On Thu, 2008-12-18 at 11:40 -0500, Gu, Han wrote:
> Another question since I hit another snag on this, hopefully it's the last =)
>
> Sample -->
>
> $s2 = "c:\ise\conf\ise_eif_lvc.config";
You should always escape backslashes in literal strings:
#!/usr/bin/perl
use strict;
use warnings;
my $s
Another question since I hit another snag on this, hopefully it's the last =)
Sample -->
$s2 = "c:\ise\conf\ise_eif_lvc.config";
$s1 = ; # This could be from command line or reading from a file
# But the input will be the following --
#
if( $s1 =~ m/\Q$s2\E/i ){
print "matched\n";
}
Thx again
-Original Message-
From: Mr. Shawn H. Corey [mailto:shawnhco...@magma.ca]
Sent: Thursday, December 18, 2008 10:53 AM
To: Gu, Han
Cc: 'beginners@perl.org'
Subject: Re: Trying to match window's path
On Thu, 2008-12-18 at 10:50 -0500, Mr. Shawn H. Corey wrote:
> On Thu, 2008-12-18
On Thu, 2008-12-18 at 10:50 -0500, Mr. Shawn H. Corey wrote:
> On Thu, 2008-12-18 at 10:42 -0500, Gu, Han wrote:
> > Hi,
> > Still very noob when it comes to perl. Just have a quick question. I am
> > trying to match a string that is window's path
> >
> > Sample,
> >
> > $s1 = "c:\\log\s1.log";
Great, ty so much
-Original Message-
From: Mr. Shawn H. Corey [mailto:shawnhco...@magma.ca]
Sent: Thursday, December 18, 2008 10:51 AM
To: Gu, Han
Cc: 'beginners@perl.org'
Subject: Re: Trying to match window's path
On Thu, 2008-12-18 at 10:42 -0500, Gu, Han wrote:
> Hi,
> Still very noob
On Thu, 2008-12-18 at 10:42 -0500, Gu, Han wrote:
> Hi,
> Still very noob when it comes to perl. Just have a quick question. I am
> trying to match a string that is window's path
>
> Sample,
>
> $s1 = "c:\\log\s1.log";
>
> $s2 = $s1;
>
> If ($s1 =~ m/$s2/i) {
> print "matched\n";
>
Hi,
Still very noob when it comes to perl. Just have a quick question. I am trying
to match a string that is window's path
Sample,
$s1 = "c:\\log\s1.log";
$s2 = $s1;
If ($s1 =~ m/$s2/i) {
print "matched\n";
}
It just wouldn't match. I can put the actual string into m//i, which wou
Well, it is coming from an Windows environment but I am doing my work on a
Linux box. I see 7z has a Linux port, so will try that. Thanks for all your
help.
John
snip
>From: Chas. Owens [mailto:chas.ow...@gmail.com]
>It sounds like you are on a Win32 machine. If so, download 7->zip* and
>insta
I am dependent on a vendor who think PGP is hard to do. ACK!
So, I was trying to use Perl to process the winzip password protected file. I
am unfamiliar with the Expect module and looking out on CPAN it I am not sure
what you were suggesting. It looks like it spawns a processes. Are you saying I
On Dec 14, 10:37 am, atiqul.is...@gmail.com (AtiqulRE) wrote:
> Hi,
>
> New to Perl. Need help to write server side using Perl that returns
> JSON data.
Go to google , type in "Perl JSON"
> Please include detail examples. e.g. how to take a hash and convert to
> JSON or array of hashes and conver
12 matches
Mail list logo