RE: Query in Perl Programming

2009-01-28 Thread S, Rajini (STSD)
Thanks Gunnar for the suggestions. In which version of perl is Parse module available. We have perl version 5.8.0 and parse module is not available. Rajini >-Original Message- >From: Gunnar Hjalmarsson [mailto:nore...@gunnar.cc] >Sent: Tuesday, January 27, 2009 7:42 PM >To: be

Re: Query in Perl Programming

2009-01-28 Thread Rob Dixon
S, Rajini (STSD) wrote: > From: Gunnar Hjalmarsson [mailto:nore...@gunnar.cc] >> S, Rajini (STSD) wrote: >>> >>> I am new to Perl Programming and have a query in perl. >>> >>> In perl is there any system defined functions to find out the >>> Differences in dates. >>> >>> Eg : >>> >>> Date 1 ->

Re: removing an arbitrary element from array

2009-01-28 Thread Sharan Basappa
On Sun, Dec 7, 2008 at 2:01 AM, Rob Dixon wrote: > Sharan Basappa wrote: >> >> I was wondering if there is a quick way to remove an arbitrary element >> from an array. >> I have an array which stores _ delimited strings a_b_c_1). The last >> string stores the rank of the string. >> I have to remov

Re: removing an arbitrary element from array

2009-01-28 Thread Rob Dixon
Sharan Basappa wrote: > On Sun, Dec 7, 2008 at 2:01 AM, Rob Dixon wrote: >> >> I'm hoping you've made a mistake, because if I understand you correctly then >> out >> of ('a_b_c_1', 'a_b_c_2') the first should be removed because 1 is less than >> two. >> >> If I'm right then the program below sho

Re: removing an arbitrary element from array

2009-01-28 Thread Sharan Basappa
Thank you ... -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Query in Perl Programming

2009-01-28 Thread Gunnar Hjalmarsson
Rob Dixon wrote: S, Rajini (STSD) wrote: From: Gunnar Hjalmarsson [mailto:nore...@gunnar.cc] Your particular problem can be easily solved using only a module that is included in the standard Perl distribution. use Date::Parse; my $time1 = str2time '26-Jan-2009'; my $time2 = str2

Re: Help with modules and objects

2009-01-28 Thread Bill
On Jan 26, 1:36 pm, wpflu...@yahoo.com (Bill) wrote: > I'm not a beginner with perl but all of my previous stuff has been > simple and I've never really used modules, until now.  I'm working on > a program that has to receive a mime encoded email and pull info out > of it.  I'm using Email::Simple

Re: What does MakeFile do?

2009-01-28 Thread Lewis Kirk
>Which is obviously a real beginner question. I have googled around, but all >the info I have found assumes you have access to the server. > >My sites are shared hosting accounts located at Earthlink, Verio, GoDaddy, >etc. I have used a number of scripts which I can use just by ftp uploading >te

Re: What does MakeFile do?

2009-01-28 Thread Owen
>>Which is obviously a real beginner question. I have googled around, >> but all the info I have found assumes you have access to the server. >> >>My sites are shared hosting accounts located at Earthlink, Verio, >> GoDaddy, etc. I have used a number of scripts which I can use just by ftp uploading

perl stdout errors due to called script does not exist

2009-01-28 Thread inetquestion
for the example perl script below is there a way to avoid errors from showing up in stdout if the shell script being called does not exist? The shell script being called is not in the same directory as the perl script, but is in the path. Otherwise I would just do a check to see if it exist before

Re: perl stdout errors due to called script does not exist

2009-01-28 Thread Raymond Wan
Hi, inetquestion wrote: for the example perl script below is there a way to avoid errors from showing up in stdout if the shell script being called does not exist? The shell script being called is not in the same directory as the perl script, but is in the path. Otherwise I would just do a che

system("cd /home/tomer/temp") problem

2009-01-28 Thread tomer
after exectue the command system("cd /home/tomer/temp") I dont see the terminal change the direcotry? maybe the change is valid only in the script? how can i control "seeing" terminal direcotry with perl script ? Thanks Tomer -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For addition

Re: system("cd /home/tomer/temp") problem

2009-01-28 Thread Raymond Wan
Hi Tomer, tomer wrote: after exectue the command system("cd /home/tomer/temp") I dont see the terminal change the direcotry? maybe the change is valid only in the script? how can i control "seeing" terminal direcotry with perl script ? system might not be what you want. What it does is tha

very basic questions

2009-01-28 Thread b chen
i am completely new to perl, can you explain to me the following line of code in red. how does this line of code grab a time value and assign it to $ time, how does assigment happend in this conditiona statement. while (<>) { chop; # Grab the time next unless ($time) = /(\d+:\d+:\d+\,\d+)/;

Re: very basic questions

2009-01-28 Thread Owen
> i am completely new to perl, can you explain to me the following line > of > code in red. > > how does this line of code grab a time value and assign it to $ time, > > how does assigment happend in this conditiona statement. > > > > while (<>) > { > chop; > # Grab the time > next unless ($time

Re: very basic questions

2009-01-28 Thread John W. Krahn
b chen wrote: i am completely new to perl, can you explain to me the following line of code in red. There is no red here, there is only black and white. how does this line of code grab a time value and assign it to $ time, how does assigment happend in this conditiona statement. while (<

how to copy elements into the next array

2009-01-28 Thread itshardtogetone
Hi, How do I copy the first 10 elements of @a into @b? The method that I use is long :- my @a = 1..20; my @b = (); my $ctr = 0; foreach (@a){ if ($ctr < 10){ push @b,$_; } $ctr ++; } Thanks.

回复:how to copy elements into the next array

2009-01-28 Thread yantao
try this, @b[0..9] = @a[0..9]; - 原邮件 - 从: itshardtogetone 日期: 星期四, 一月 29日, 2009 下午2:39 主题: how to copy elements into the next array > Hi, > How do I copy the first 10 elements of @a into @b? > > The method that I use is long :- > my @a = 1..20; > my @b = (); > > my $ctr = 0; > foreac

Re: how to copy elements into the next array

2009-01-28 Thread John W. Krahn
itshardtogetone wrote: Hi, Hello, How do I copy the first 10 elements of @a into @b? my @b = @a[ 0 .. 9 ]; John -- Those people who think they know everything are a great annoyance to those of us who do.-- Isaac Asimov -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For

RE: Is there a way to un-install modules?

2009-01-28 Thread sanket vaidya
Hi, There is no tool available to uninstall modules. However what you can do manually is this. I use Active Perl 5.10 on Windows. 1. Open the .packlist file in Perl/lib directory in any text editor. This contains the path of all modules installed on your system (along with some other entries a