-Original Message-
From: sanket vaidya [mailto:sanket.vai...@patni.com]
Sent: Friday, March 05, 2010 5:36 PM
To: 'YAPH'
Subject: RE: Can anybody explain me what this shebang line is doing?
>From: YAPH [mailto:yet.another.perl.hac...@gmail.com]
>Sent: Friday, March 0
gs;
use strict;
my $string = '100955 BLow-Gomez,Joseph MMEX.AMER. QHUTC012';
my $id = split(/\s/,$string);
print "id = $id";
Output:
4
This is the no. of elements in the array generated by split.
Why in first case (when brackets are used) it prints correct
Thanks John. It works
Regards,
Sanket Vaidya
-Original Message-
From: John W. Krahn [mailto:jwkr...@shaw.ca]
Sent: Wednesday, July 01, 2009 11:17 AM
To: Perl Beginners
Subject: Re: Substitution question
sanket vaidya wrote:
> Hi all,
Hello,
> As a part of one program I need
anyone tell me
why this happens & how to overcome it?
Thanks & Regards,
Sanket Vaidya
_
This e-mail message may contain proprietary, confidential or legally privileged
information for the sole use of the perso
This depends on your source package. Refer 'Cross-platform Packages' from
above link.
Hope this helps.
Thanks & Regards,
Sanket Vaidya
_
This e-mail message may contain proprietary, confidential or legally privile
-Original Message-
From: Chas. Owens [mailto:chas.ow...@gmail.com]
Sent: Friday, May 29, 2009 10:22 AM
To: sanket vaidya
Cc: beginners@perl.org
Subject: Re: Range Operator Question
On Thu, May 28, 2009 at 23:49, sanket vaidya
wrote:
snip
> Can anyone write few simple codes explain
l on Windows.
Thanks & Regards,
Sanket Vaidya
_
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 a
-Original Message-
From: sanket vaidya [mailto:sanket.vai...@patni.com]
Sent: Friday, May 29, 2009 9:20 AM
To: 'beginners@perl.org'
Subject: RE: Range Operator Question
-Original Message-
From: Chas. Owens [mailto:chas.ow...@gmail.com]
Sent: Thursday, May 28, 2009
-Original Message-
From: Chas. Owens [mailto:chas.ow...@gmail.com]
Sent: Thursday, May 28, 2009 5:55 PM
To: sanket vaidya
Cc: beginners@perl.org
Subject: Re: Range Operator Question
On Thu, May 28, 2009 at 07:51, sanket vaidya
wrote:
> Hi,
>
> I came across this statement abo
Hi,
I came across this statement about 'range' operators somewhere.
There is very little difference between $x..$y and $x...$y, and if the
second operand is a constant then they are identical.
What is the difference? Kindly explain with example.
Thanks & Regards,
>>-Original Message-
> From: Thomas Bätzler [mailto:t.baetz...@bringe.com]
> Sent: Thursday, May 28, 2009 11:57 AM
> To: beginners@perl.org
> Cc: sanket vaidya
>Subject: AW: Kindly explain special variable $|
> sanket vaidya asked:
> It would be great if some
the difference.
Thanks & Regards,
Sanket Vaidya
_
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
origina
-Original Message-
From: Chas. Owens [mailto:chas.ow...@gmail.com]
Sent: Wednesday, May 27, 2009 4:52 PM
To: sanket vaidya
Cc: beginners@perl.org
Subject: Re: Question about split
On Wed, May 27, 2009 at 06:45, sanket vaidya
wrote:
> Hi all,
>
> Kindly look at the code below
64
Why the first element of @numbers is 'blank'? Kindly explain with example.
Thanks & Regards,
Sanket Vaidya
_
This e-mail message may contain proprietary, confidential or legally privileged
information
3rd row upto 100th column
$row = 3;
for $col (1..100)
{
$worksheet->write($row, $col, $data);
}
#$data will be specific for each cell
Regards,
Sanket Vaidya
_
This e-mail message may contain proprietary, confidential o
)
{
$worksheet->write($row, $col, $data);
}
#$data will be specific for each cell
Regards,
Sanket Vaidya
_
This e-mail message may contain proprietary, confidential or legally privileged
information for the sole use of the pe
-Original Message-
From: Randal L. Schwartz [mailto:mer...@stonehenge.com]
Sent: Monday, May 25, 2009 10:10 PM
To: beginners@perl.org
Subject: Re: Difference between for & foreach loop
>>>>> ""sanket" == "sanket vaidya" writes:
&quo
'If you're planning to filetest the return values out of a readdir
<http://perldoc.perl.org/functions/readdir.html> , you'd better prepend the
directory in question. Otherwise, because we didn't chdir
<http://perldoc.perl.org/functions/chdir.html&g
Hi all,
What is the difference between the 'for' & 'foreach' loops? I know that they
can be used interchangeably then what is the purpose of keeping them
separate? Can anyone suggest me a good url which can tell the difference
between two?
Thanks &
Hi,
Search for some XML modules on CPAN & get your job done by using appropriate
module. I haven't used perl with XML So cannot tell you the exactly which
module.
Thanks,
Sanket Vaidya
-Original Message-
From: Sharan Basappa [mailto:sharan.basa...@gmail.com]
Sent: Wednesday,
On Feb 25, 2:41 pm, spitt...@jhmi.edu (Steve Pittman) wrote:
> I downloaded and unzipped the TAR file...how do I install it...directions say
> copy into lib which didn't work
>
> thanks in advance
Hi,
Download C++ compiler & (nmake or dmake).
Extract tar files. navigate to the directory.
perl
Pl. see my soln in the original mail
-Original Message-
From: sanket vaidya [mailto:sanket.vai...@patni.com]
Sent: Thursday, January 29, 2009 3:35 PM
To: 'Anirban Adhikary'
Cc: 'beginners@perl.org'
Subject: RE: Question related Join function
Hi Anirban,
Join
Hi Anirban,
Join works this way only. However u can accomplish your task as follows:
-Original Message-
From: Anirban Adhikary [mailto:anirban.adhik...@gmail.com]
Sent: Thursday, January 29, 2009 3:08 PM
To: beginners@perl.org
Subject: Question related Join function
Dear List
>>I ha
You can do the same with file equivalent to '.packlist' on 'LINUX' or
'UNIX'.
Hope this helps.
Thanks
Sanket Vaidya
-Original Message-
From: Randal L. Schwartz [mailto:mer...@stonehenge.com]
Sent: Sunday, January 25, 2009 9:56 AM
To: beginners@perl.org
Thanks for hint Mike. I think now I will be able to proceed.
-Original Message-
From: Mike Ward [mailto:m...@farematrix.com]
Sent: Thursday, January 08, 2009 9:59 PM
To: beginners@perl.org
Subject: Re: How to know no. of times the script has been executed?
sanket vaidya wrote
'x')
{
do something
}
How to do that?
Thanks & Regards,
Sanket Vaidya
http://www.patni.com
World-Wide Partnerships. World-Class Solutions.
_
This e-mail message may contain proprietary, confidential or legal
that?
Thanks & Regards,
Sanket Vaidya
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 o
oth cases.
Similarly $"="a" will print v1av2av3.
Thanks
Sanket Vaidya
-Original Message-
From: xie ningde [mailto:n.d.ningde...@gmail.com]
Sent: Tuesday, December 30, 2008 10:20 AM
To: beginners@perl.org
Subject: about "print"
I'm a new perl user. I was
ad Perl Interpreter &
use some editor. For Windows few editors are Crimson, Context, Perl Express
etc. I use Perl Express.
Thanks
Sanket Vaidya
http://www.patni.com
World-Wide Partnerships. World-Class Solutions.
_
This e-mail me
-Original Message-
From: yonghua.p...@gmail.com [mailto:yonghua.p...@gmail.com] On Behalf Of
Jeff Peng
Sent: Tuesday, December 23, 2008 5:30 PM
To: sanket vaidya
Cc: beginners@perl.org
Subject: Re: How to read email from Inbox
2008/12/23 sanket vaidya :
>
>
> Hi all,
>
>
Hi all,
How can we read mail from inbox without using mail client like outlook?
Using perl. i.e. Is it possible to read Inbox of your gmail account using
perl?
Thanks & Regards,
Sanket Vaidya
http://www.patni.com
World-Wide Partnerships. World-Class Solut
itten as
my ($bi, $bn, @bchrs);
my $boundry = "";
foreach $bn (48..57,65..90,97..122) {
$bchrs[$bi++] = chr($bn);
}
print @bchrs;
Output:
0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
Why value is uninitialized in Case 1.
Thanks &a
2-X86-multi-threat-5.10).
Any suggestions how to proceed with installation.
Thanks & Regards,
Sanket Vaidya
http://www.patni.com
World-Wide Partnerships. World-Class Solutions.
_
This e-mail message may contain proprieta
Hi all,
The problem was with the text file. I have solved it. Now pl. don't work for
this mail.
Thanks
Sanket Vaidya
_
Hi all,
I want to send mail using mime::lite to email addresses in text file (say
list.txt). Say the ids are [EMAIL PROTECTED], [EMAIL PROTECTED] &a
problem is this code sys that id [EMAIL PROTECTED] doesn't exists.
If I try @array = ('[EMAIL PROTECTED]','[EMAIL PROTECTED]') it works. The error
is SMTP
recipient command failed. I have gone thr
-Original Message-
From: Chas. Owens [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 16, 2008 2:36 PM
To: sanket vaidya
Cc: beginners@perl.org
Subject: Re: if condition question
On Thu, Oct 16, 2008 at 04:54, sanket vaidya <[EMAIL PROTECTED]>
wrote:
snip
> Now when I write
use warnings;
use strict;
my $string = "test";
$string eq "test" ? print "correct" : "";
Output:
Correct
Useless use of constant in void context at line 5.
Can any one suggest the reason of warning in Case2.
Thanks & Regards,
San
use warnings;
use strict;
my $string = "test";
$string eq "test" ? print "correct" : "";
Output:
Correct
Useless use of constant in void context at line 5.
Can any one suggest the reason of warning in Case2.
Thanks & Regards,
San
ie "Cannot open file: $!"; #(example.txt is file
containing your column)
undef $/;
my $text = ;
$text=~s/[^AGTC]//g; #remove anything which is not A,G,T or C
print "$text"; # $text will contain your required output
Let me know if this helps.
Thanks
Sanket Vaidya
-Original Mess
ie "Cannot open file: $!"; #(example.txt is file
containing your column)
undef $/;
my $text = ;
$text=~s/[^AGTC]//g; #remove anything which is not A,G,T or C
print "$text"; # $text will contain your required output
Let me know if this helps.
Thanks
Sanket Vaidya
-Original Message
. stop
Note:- I am navigated to UU directory after Configure.
I am using KNOPPIX & I need to install it in the above path only.
Any suggestions from you all, How to proceed further?
I use KNOPPIX Live CD & want to install modules, so cannot install it in
perl that comes with it.
T
Hi all,
I have downloaded perl 5.10. I install it using following steps:
sh Configure -de -Dprefix=/mnt/hdc8/Perl
make
make test
make install
when I run 'make' after configure, I get following message.
No rule to make target 'test'. stop
Note:- I am navigated to
Hi Raymond,
Thanx a lot for suggestion.
-Original Message-
From: Raymond Wan [mailto:[EMAIL PROTECTED]
Sent: Monday, August 25, 2008 11:21 AM
To: sanket vaidya
Cc: beginners@perl.org
Subject: Re: How to compress an exe file?
Hi Sanket,
sanket vaidya wrote:
> I have m
Hi all,
I have made an exe using PAR::Packer. Now I want to reduce the
size of exe. Can anyone suggest me how to do that?
Thanks & Regards,
Sanket Vaidya
http://www.patni.com
World-Wide Partnerships. World-Class Solut
file urgently. Pl. suggest how to get
rid of this.
I use Active Perl 5.10.0 on Win Xp.
Thanks & Regards,
Sanket Vaidya
http://www.patni.com
World-Wide Partnerships. World-Class Solutions.
_
This e-mail message may
Hi all,
I have posted this in couple of LINUX groups before 5 days & yet have not
got any reply. Can anyone from this group could help me out?
I am a beginner & I haven't installed anything on LINUX. I use
KNOPPIX 3.7 Live CD. I have downloaded the ZGV to view
images in Text-only mod
s"
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
o 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
Ca
$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
---
AIL 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.
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
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:[
HI all,
Kindly go through the code below.
use warnings;
use strict;
my $i=1;
while($i<=10)
{
$_ = "abcpqr";
$_=~ s/(?=pqr)/$i/;
print "$_\n";
$i++;
}
Output:
abc1pqr
abc2pqr
abc3pqr
abc4pqr
abc5pqr
abc6pqr
abc7pqr
abc8pqr
abc9pqr
abc10pqr
The expected output is
Hi,
I cannot instead module using ppm or MCPAN (office proxy wont allow me to do
this) & I have never installed a perl module manually. I am installing
DBD::mysql module. When I get into the module directory & type "perl
makefile.pl" I get error as below:
Failed to determine directory of my
On Apr 16, 6:28 pm, [EMAIL PROTECTED] (Gunnar Hjalmarsson) wrote:
> sanket vaidya wrote:
> > Kindly go through the code below.
>
>
>
> > use CGI::Push qw(:standard);
>
> > do_push(-next_page=>\&refresh,
> > -last_page=>\&done);
>
Hi,
Kindly go through the code below.
#!D:\Perl\bin\perl
use warnings;
use strict;
my $line="";
use CGI::Push qw(:standard);
do_push(-next_page=>\&refresh,
-last_page=>\&done);
sub refresh()
{
my ($cgi,$count)[EMAIL PROTECTED];
if($count>10)
{
return undef;
Hi,
Here is the code to accomplish your task. It involves too many substitutions
but it accomplishes your task. I think there should be a simpler
substitution which I am not aware:
use warnings;
use strict;
my $str = "tokena
name: name1
tokenb
tokena
name: name2
tokenb
tokena
name: name3
Go through the below codes.
use strict;
use warnings;
my $scalar = "aaaba" =~ /a/g;
my @list = "aaaba" =~ /a/g;
my $list_then_scalar =()= "aaaba" =~ /a/g;
print "scalar: $scalar\nlist: @list\nlist then scalar: $list_then_scalar\n";
$scalar="aaaba";
my $count = $scalar =~ tr/a//;
print "\n\nCou
Hi
You get the error on chop because anything given with chop function is
considered as string (In other words chop acts on string). So perl considers
the '+' operator you provide with chop as string rather than addition
operator.This is how your task can be accomplished.
use warnings;
use stric
Here is the code to match 0 to 10 using regex.
use warnings;
use strict;
print "Enter any number:";
my $input = ;
chomp($input);
if($input=~ m/^10$|^[0-9]$/)
{
print "matched";
}
else
{
print "not matched";
}
Hope it helps.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL P
Here is the code to accomplish your task.
use warnings;
use strict;
my $a = "a, 1, b, 2, c, 3";
$a =~ s/ //g; #delete spaces from $a
my @array = split(",",$a);
my %b = (
$array[0] => $array[1],
$array[2] => $array[3],
$array[4] => $array[5]
);
for (keys%b)
{
print "$_ => $b{$_}\n";
}
The
Hi all
I have some files stored in directory "resumes1" (say the files are file1,
file2 & file3).
When I run the following code
use warnings;
use strict;
use File::Find;
find (\&del,"D:/resumes1");
sub del
{
print "File name is $_\n ";
}
The output is:
File n
Here is the entire code to accomplish your task. It will delete 1st & 3rd
lines.
use warnings;
use strict;
my @array;
open FH,"data.txt";
@array = ;
for my $i (0..$#array)
{
$array[$i] =~ s/^(\*\/tmp\/dst\/file(1|3)\*(\d){3}\*RW\*(\d){3,4})$/ /;
#replace the lines you want to delete with " "
Here is the entire code to accomplish your task. It will delete 1st & 3rd
lines.
use warnings;
use strict;
my @array;
open FH,"data.txt";
@array = ;
for my $i (0..$#array)
{
$array[$i] =~ s/^(\*\/tmp\/dst\/file(1|3)\*(\d){3}\*RW\*(\d){3,4})$/ /;
#replace the lines you want to delete with " " (sp
ent outputs in two different versions?
>From where did "1" come from & how to remove it?
Thanks in advance.
Regards,
Sanket Vaidya
Software Engineer
Patni Computer Systems Ltd.
A-78/9, GIDC Electronics Estate,
Sector 25, Gandhinagar - 382016
Tel: +91-79-2324 0905 Ext: 334
Mobile: +91-9824300897
Hi all,
I am having some questions regarding following codes:
use warnings;
$name = "sanket";
$fred::name = "Fred;
print "In main name = $name\n";
package Fred;
print "Now name = $name";
The output will be as expected:
In main name = sanket
Now name = Fre
Hi all,
I am having some questions regarding following codes:
use warnings;
$name = "sanket";
$fred::name = "Fred;
print "In main name = $name\n";
package Fred;
print "Now name = $name";
The output will be as expected:
In main name = sanket
Now name = Fre
67 matches
Mail list logo