Re: Query regarding Parallel::ForkManager

2012-03-30 Thread Dr.Ruud
On 2012-03-30 11:14, punit jain wrote: my $file = /tmp/test; die \n Killed as filed doesnot exist \n if(-e $file); It looks like you have to reverse your test. -e $file or die [$$] exit early because '$file' doesn't exist\n; But why even start a child, if its data

Re: Query on Qunatifiers

2010-07-15 Thread Shlomi Fish
On Thursday 15 Jul 2010 09:51:32 Chandan Kumar wrote: Hi , I have query over quantifiers. Could you please explain the combination of operators Question mark (?),dot(.),star(*),plus(+). Say this is my string: $_ = this is my first pattern ,quite confused with quantifiers

Re: Query on Qunatifiers

2010-07-15 Thread Chas. Owens
On Thu, Jul 15, 2010 at 03:22, Thomas Bätzler t.baetz...@bringe.com wrote: snip In RE, a . by itself is the atom that matches any one character. The quantifiers mean: ? 0 or 1 occurences of the previous expression. + 1 or more occurrences of the previous expression (greedy match). * 0 or

Re: Query on Qunatifiers

2010-07-15 Thread Chandan Kumar
in advance.     Best Regards, chandan. --- On Thu, 15/7/10, Chas. Owens chas.ow...@gmail.com wrote: From: Chas. Owens chas.ow...@gmail.com Subject: Re: Query on Qunatifiers To: Thomas Bätzler t.baetz...@bringe.com Cc: Beginners Perl beginners@perl.org, Chandan Kumar chandan_28...@yahoo.com Date

Re: Query on Qunatifiers

2010-07-15 Thread Jim Gibson
On 7/15/10 Thu Jul 15, 2010 12:24 PM, Chandan Kumar chandan_28...@yahoo.com scribbled: Hi guys,   I could able to understand the quantifiers. But still stuck with one confusion.if dot operator is used with quantifiers.   ex: my string is $_=ths is my first regular expression;  

Re: query

2009-12-22 Thread Parag Kalra
my $input = shift; what are we doing here? First input paramter to the subroutine is getting shifted i.e getting stored in the variable '$input' $sum += $_ for @digits; - what exactly is the . All the elements of the array '@digits' are getting

Re: Query Online File Size

2009-11-26 Thread Giany
use LWP::UserAgent; sub GetFileSize{ my $url=shift; $ua = new LWP::UserAgent; $ua-agent(Mozilla/5.0); my $req = new HTTP::Request 'HEAD' = $url; $req-header('Accept' = 'text/html'); $res = $ua-request($req); if ($res-is_success) {

RE: Query related to PAR::Packer

2009-06-23 Thread sanket vaidya
-Original Message- From: Anirban Adhikary [mailto:anirban.adhik...@gmail.com] Sent: Saturday, June 20, 2009 9:26 PM To: beginners@perl.org Subject: Query related to PAR::Packer Hi List I need to run some applications written entirely in perl in some systems where I dont have an access.

Re: query in searching

2009-03-25 Thread Chas. Owens
On Tue, Mar 24, 2009 at 19:50, Rajini Naidu rajinid...@gmail.com wrote: snip open my $IN,  '', $data_dir/$node.load or die Cannot open '$data_dir/$node.load' $!; open my $OUT, '', /tmp/$day[0].$day[1].$day[2].$node.log or die Cannot open '/tmp/$day[0].$day[1].$day[2].$node.log' $!; while (

Re: query in searching

2009-03-24 Thread John W. Krahn
Rajini Naidu wrote: Hi, Hello, I am trying to search for a pattern in a file in my perl script. Syntax used is : system(grep \$res\ ${data_dir}/${node}.load /tmp/${day[0]}.${day[1]}.${day[2]}.${node}.log); But the grep command is'nt successful in getting the desired string. Am I missing

Re: query in searching

2009-03-24 Thread Rajini Naidu
Thanks John for the reply. I included the code as you suggested, but does'nt seem to work. The output file is empty. -rajini On Wed, Mar 25, 2009 at 12:19 AM, John W. Krahn jwkr...@shaw.ca wrote: Rajini Naidu wrote: Hi, Hello, I am trying to search for a pattern in a file in

RE: Query in Perl Programming

2009-02-24 Thread S, Rajini (STSD)
] Sent: Tuesday, February 24, 2009 4:40 AM To: Perl Beginners Cc: S, Rajini (STSD) Subject: Re: Query in Perl Programming S, Rajini (STSD) wrote: From: Owen [mailto:rc...@pcug.org.au] S, Rajini (STSD) wrote: When I included the below code in my script, I am getting below errors. Use

Re: Query in Perl Programming

2009-02-24 Thread Chas. Owens
);  } } -Rajini -Original Message- From: Rob Dixon [mailto:rob.di...@gmx.com] Sent: Tuesday, February 24, 2009 4:40 AM To: Perl Beginners Cc: S, Rajini (STSD) Subject: Re: Query in Perl Programming S, Rajini (STSD) wrote: From: Owen [mailto:rc...@pcug.org.au] S, Rajini (STSD) wrote:  When I

Re: Query in Perl Programming

2009-02-24 Thread Owen
On Tue, 24 Feb 2009 09:58:00 + S, Rajini (STSD) rajin...@hp.com wrote: My code in the program is : That all seems to work. If you ever have problems getting a program to work, it is often advisable to add some debugging aids, and I have added a few to your code below so you might get the

RE: Query in Perl Programming

2009-02-23 Thread S, Rajini (STSD)
Yeah, the script posted below is part of the code In my script. After including the below code, when I ran the script, I am getting the uninitialized value errors. Nope Do the following Copy the code you posted to a new file add #!/usr/bin/perl to the first line then run perl -c

Re: Query in Perl Programming

2009-02-23 Thread Chas. Owens
On Mon, Feb 23, 2009 at 06:01, S, Rajini (STSD) rajin...@hp.com wrote: snip Still I get the message : syntax OK snip Odd, I am getting: Global symbol $days1 requires explicit package name at z.pl line 5. Global symbol $days2 requires explicit package name at z.pl line 6. Global symbol $day

Re: Query in Perl Programming

2009-02-23 Thread Rob Dixon
S, Rajini (STSD) wrote: From: Owen [mailto:rc...@pcug.org.au] S, Rajini (STSD) wrote: When I included the below code in my script, I am getting below errors. Use of uninitialized value in integer ge (=) at /usr/local/lib/perl5/5.8.0/Time/Local.pm line 73. Use of uninitialized value

RE: Query in Perl Programming

2009-02-22 Thread S, Rajini (STSD)
...@gmx.com] Sent: Friday, January 30, 2009 5:32 PM To: Perl Beginners Cc: S, Rajini (STSD) Subject: Re: Query in Perl Programming S, Rajini (STSD) wrote: Hi Rob, When I set the date to 30-Jan-2009 and run the code given below, Eg : When dates are set as : my $days1 = epoch_days

RE: Query in Perl Programming

2009-02-22 Thread Owen
Hi Rob, When I included the below code in my script, I am getting below errors. Use of uninitialized value in integer ge (=) at /usr/local/lib/perl5/5.8.0/Time/Local.pm line 73. Use of uninitialized value in integer lt () at /usr/local/lib/perl5/5.8.0/Time/Local.pm line 73. Use of

RE: Query in Perl Programming

2009-02-22 Thread S, Rajini (STSD)
: Monday, February 23, 2009 10:08 AM To: S, Rajini (STSD) Cc: Rob Dixon; Perl Beginners Subject: RE: Query in Perl Programming Hi Rob, When I included the below code in my script, I am getting below errors. Use of uninitialized value in integer ge (=) at /usr/local/lib/perl5/5.8.0/Time

RE: Query in Perl Programming

2009-02-22 Thread Owen
Hi Owen, My code is as follows : use strict; use warnings; use Time::Local; $days1 = epoch_days('30-Jan-09'); $days2 = epoch_days('16-Feb-09'); $day = $days1 - $days2; print Difference: @{[$days1 - $days2]} days\n; BEGIN { my %month_num = do { my $n = 0; map(($_,

RE: Query in Perl Programming

2009-02-22 Thread S, Rajini (STSD)
#perl -c script name syntax OK -rajini -Original Message- From: Owen [mailto:rc...@pcug.org.au] Sent: Monday, February 23, 2009 11:09 AM To: S, Rajini (STSD) Cc: Perl Beginners Subject: RE: Query in Perl Programming Hi Owen, My code is as follows : use strict; use

RE: Query in Perl Programming

2009-02-22 Thread Owen
23, 2009 11:09 AM To: S, Rajini (STSD) Cc: Perl Beginners Subject: RE: Query in Perl Programming Hi Owen, My code is as follows : use strict; use warnings; use Time::Local; $days1 = epoch_days('30-Jan-09'); $days2 = epoch_days('16-Feb-09'); $day = $days1 - $days2; print Difference

RE: Query in Perl Programming

2009-02-22 Thread S, Rajini (STSD)
, Rajini (STSD) Cc: Perl Beginners Subject: RE: Query in Perl Programming #perl -c script name syntax OK Nope, I bet you ran that against the script you have on your computer and NOT the script you posted below. Fix that and I will tell you how to the fix the rest Owen -Original

RE: Query in Perl Programming

2009-02-22 Thread Owen
Yeah, the script posted below is part of the code In my script. After including the below code, when I ran the script, I am getting the uninitialized value errors. Nope Do the following Copy the code you posted to a new file add #!/usr/bin/perl to the first line then run perl -c

RE: Query in Perl Programming

2009-01-30 Thread S, Rajini (STSD)
line 35 -Rajini -Original Message- From: S, Rajini (STSD) Sent: Friday, January 30, 2009 9:50 AM To: Rob Dixon; Perl Beginners Subject: RE: Query in Perl Programming Thanks Rob, the solution which you suggested works fine. -Rajini -Original Message- From: Rob Dixon

RE: Query in Perl Programming

2009-01-30 Thread Owen
Hi Rob, When I set the date to 30-Jan-2009 and run the code given below, Eg : When dates are set as : my $days1 = epoch_days('30-Jan-09'); my $days2 = epoch_days('29-Feb-2009'); I get the below error. hpcll402:/home/raji/perl./date2.pl Day '30' out of range 1..28 at ./date2.pl

RE: Query in Perl Programming

2009-01-30 Thread S, Rajini (STSD)
To: S, Rajini (STSD) Cc: Perl Beginners Subject: RE: Query in Perl Programming Hi Rob, When I set the date to 30-Jan-2009 and run the code given below, Eg : When dates are set as : my $days1 = epoch_days('30-Jan-09'); my $days2 = epoch_days('29-Feb-2009'); I get the below error

RE: Query in Perl Programming

2009-01-30 Thread Owen
To: S, Rajini (STSD) Cc: Perl Beginners Subject: RE: Query in Perl Programming Hi Rob, When I set the date to 30-Jan-2009 and run the code given below, Eg : When dates are set as : my $days1 = epoch_days('30-Jan-09'); my $days2 = epoch_days('29-Feb-2009'); I get the below error

RE: Query in Perl Programming

2009-01-30 Thread S, Rajini (STSD)
Beginners Subject: RE: Query in Perl Programming Get the same error, when the date is set to my $days1 = epoch_days('30-Jan-09'); my $days2 = epoch_days('14-Feb-2009'); Day '30' out of range 1..28 at ./date2.pl line 35 -Rajini -Original Message- From: Owen [mailto:rc

Re: Query in Perl Programming

2009-01-30 Thread Rob Dixon
S, Rajini (STSD) wrote: Hi Rob, When I set the date to 30-Jan-2009 and run the code given below, Eg : When dates are set as : my $days1 = epoch_days('30-Jan-09'); my $days2 = epoch_days('29-Feb-2009'); I get the below error. hpcll402:/home/raji/perl./date2.pl Day

RE: Query in Perl Programming

2009-01-29 Thread S, Rajini (STSD)
Thanks Rob, the solution which you suggested works fine. -Rajini -Original Message- From: Rob Dixon [mailto:rob.di...@gmx.com] Sent: Wednesday, January 28, 2009 5:45 PM To: Perl Beginners Cc: S, Rajini (STSD) Subject: Re: Query in Perl Programming S, Rajini (STSD) wrote: From

RE: Query in Perl Programming

2009-01-28 Thread S, Rajini (STSD)
To: beginners@perl.org Subject: Re: Query in Perl Programming S, Rajini (STSD) wrote: Hi, 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 - 26-Jan-2009 Date 2 - 14-Jan-2009 So

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 - 26-Jan-2009 Date 2 -

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 =

Re: Query in Perl Programming

2009-01-27 Thread rhosto
On Jan 26, 9:37 pm, rajin...@hp.com (Rajini S) wrote: Hi, 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 - 26-Jan-2009 Date 2 - 14-Jan-2009 So the difference between two dates is 12

Re: Query in Perl Programming

2009-01-27 Thread Gunnar Hjalmarsson
S, Rajini (STSD) wrote: Hi, 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 - 26-Jan-2009 Date 2 - 14-Jan-2009 So the difference between two dates is 12 days. Is there a way to

Re: Query in Perl Programming

2009-01-26 Thread Erez Schatz
2009/1/27 S, Rajini (STSD) rajin...@hp.com: In perl is there any system defined functions to find out the Differences in dates. Not as such. There are ways to do it by using Date:: modules, like Date::Manip, Date::Calc, or DateTime. Try the following links for more detailed information about

RE: Query : Exectuting flow in parllel dirs

2009-01-20 Thread vivekananda.mohana
Any inputs? Lemme know if the Q is ambiguous? Thanks. Regards, Vivek From: Vivekananda Mohana (WT01 - PES-Semi-Technology) Sent: Sunday, January 18, 2009 8:36 PM To: beginners@perl.org Subject: RE: Query : Exectuting flow in parllel dirs Hi, Pls help

RE: Query : Exectuting flow in parllel dirs

2009-01-18 Thread vivekananda.mohana
Hi, Pls help with the correct syntax. Appreciate the help. Thanks Regards, Vivek From: Vivekananda Mohana (WT01 - PES-Semi-Technology) Sent: Friday, January 16, 2009 3:23 PM To: 'beginners@perl.org' Subject: Query : Exectuting flow in parllel dirs Hi, I

Re: QUERY: batch CPAN installation...

2008-03-14 Thread eMko
Hello. This command perl -MCPAN -einstall Wx, Tie::File, Tie::Hash works well. It is only for instance, because Wx I have installed (and using) and either Tie::File or Tie::Hash comes with Perl. When running perl, the -M parameter tells it to use a package. -e parameter tells it to run some

Re: QUERY: batch CPAN installation...

2008-03-14 Thread Peter Scott
[top first posting reordered] On Fri, 14 Mar 2008 12:27:17 +0100, eMko wrote: Andrew Wan wrote: I've got a list of CPAN modules that I want to install, over the internet. From experience, I just type cpan, then: install HTML::Clean (press RETURN for dependency prompts) install

Re: Query

2007-07-22 Thread yaron
] To: beginners@perl.org, Paul Lalli [EMAIL PROTECTED] Cc: beginners@perl.org Sent: 10:55:01 (GMT+0200) Africa/Harare יום שישי 20 יולי 2007 Subject: Re: Query Paul Lalli wrote: On Jul 18, 6:43 am, [EMAIL PROTECTED] (kapil.V) wrote: su-2.05b# df -h . Filesystem Size Used Avail Capacity Mounted

Re: Query

2007-07-21 Thread kapil.V
Paul Lalli wrote: On Jul 18, 6:43 am, [EMAIL PROTECTED] (kapil.V) wrote: su-2.05b# df -h . Filesystem Size Used Avail Capacity Mounted on /dev/ad0s1e 136G 102G 23G 82% /home From my script I do: my $du = qx#df -h \.#; ($total,$used) = $du =~

Re: Query

2007-07-19 Thread Paul Lalli
On Jul 18, 6:43 am, [EMAIL PROTECTED] (kapil.V) wrote: su-2.05b# df -h . Filesystem Size Used Avail Capacity Mounted on /dev/ad0s1e 136G 102G 23G 82% /home From my script I do: my $du = qx#df -h \.#; ($total,$used) = $du =~ /([0-9]+(\.[ 0-9]+)?)[

Re: Query

2007-07-19 Thread kapil.V
John W. Krahn wrote: kapil.V wrote: Hi, Hello, su-2.05b# df -h . Filesystem Size Used Avail Capacity Mounted on /dev/ad0s1e 136G 102G 23G 82% /home From my script I do: my $du = qx#df -h \.#; ($total,$used) = $du =~ /([0-9]+(\.[ 0-9]+)?)[ M|G]/sg;

Re: Query

2007-07-18 Thread Jeff Pang
--- kapil.V [EMAIL PROTECTED] wrote: Hi, su-2.05b# df -h . Filesystem Size Used Avail Capacity Mounted on /dev/ad0s1e 136G 102G 23G 82% /home From my script I do: my $du = qx#df -h \.#; ($total,$used) = $du =~ /([0-9]+(\.[ 0-9]+)?)[ M|G]/sg;

Re: Query

2007-07-18 Thread Mr. Shawn H. Corey
kapil.V wrote: Hi, su-2.05b# df -h . Filesystem Size Used Avail Capacity Mounted on /dev/ad0s1e 136G 102G 23G 82% /home From my script I do: my $du = qx#df -h \.#; ($total,$used) = $du =~ /([0-9]+(\.[ 0-9]+)?)[ M|G]/sg; ^^ looks

Re: Query

2007-07-18 Thread John W. Krahn
kapil.V wrote: Hi, Hello, su-2.05b# df -h . Filesystem Size Used Avail Capacity Mounted on /dev/ad0s1e 136G 102G 23G 82% /home From my script I do: my $du = qx#df -h \.#; ($total,$used) = $du =~ /([0-9]+(\.[ 0-9]+)?)[ M|G]/sg; ^

Re: query about code

2007-07-04 Thread Jenda Krynicky
From: Amichai Teumim [EMAIL PROTECTED] Can someone explain to me what this script really does? I mean I see that it lists dir within dir. But what is the code doing? For example all the blue highlighted stuff, what is it doing? There is no highlighting in a plain text email!

Re: query about code

2007-07-04 Thread Martin Barth
Hi, it was hard to see the blue stuff.. :) On Wed, 4 Jul 2007 16:14:47 +0300 Amichai Teumim [EMAIL PROTECTED] wrote: #!/usr/bin/perl $startdir = /lib; $level = 0; list_dirs($startdir,$level); calls list_dir with $startdir and $level. sub list_dirs(){ my $dir = shift (@_);

Re: Query an IP from file

2007-05-23 Thread Jeff Pang
Thomas Bätzler 写道: Hi, Jeff Pang [EMAIL PROTECTED] asked: I have a text file which contains lots of IPs,like: 58.253.0.0/16; 58.254.0.0/16; 58.255.0.0/16; 60.0.0.0/16; 60.1.0.0/16; 60.10.0.0/16; 60.16.0.0/16; 60.17.0.0/16; 60.18.0.0/16; 60.19.0.0/16; 60.2.0.0/16; 60.20.0.0/16; 60.21.0.0/16;

Re: Query an IP from file

2007-05-23 Thread Dr.Ruud
Jeff Pang schreef: I have a text file which contains lots of IPs,like: 58.253.0.0/16; : 60.3.0.0/16; Is it always /16? Can they overlap? My question is,[ ]given an IP,[ ]ie 59.32.232.33,[ ]how can I know it exists in this file or not? exists? ITYM: matches (they are masks) You could

Re: Query an IP from file

2007-05-23 Thread Mumia W.
On 05/23/2007 03:01 AM, Jeff Pang wrote: Hello Thomas, I tried your codes,it's good I think. I've modified some of the codes to fit my situation. But if the network data files include too much IPs,my program used up all memory and couldn't get continued. Below are my modified

RE: Query an IP from file

2007-05-22 Thread Thomas Bätzler
Hi, Jeff Pang [EMAIL PROTECTED] asked: I have a text file which contains lots of IPs,like: 58.253.0.0/16; 58.254.0.0/16; 58.255.0.0/16; 60.0.0.0/16; 60.1.0.0/16; 60.10.0.0/16; 60.16.0.0/16; 60.17.0.0/16; 60.18.0.0/16; 60.19.0.0/16; 60.2.0.0/16; 60.20.0.0/16; 60.21.0.0/16;

Re: Query an IP from file

2007-05-22 Thread John W. Krahn
Jeff Pang wrote: Hello, Hello, I have a text file which contains lots of IPs,like: 58.253.0.0/16; 58.254.0.0/16; 58.255.0.0/16; 60.0.0.0/16; 60.1.0.0/16; 60.10.0.0/16; 60.16.0.0/16; 60.17.0.0/16; 60.18.0.0/16; 60.19.0.0/16; 60.2.0.0/16; 60.20.0.0/16; 60.21.0.0/16;

Re: Query an IP from file

2007-05-22 Thread yaron
Hi Jeff, Can you be more specific regarding the query duty cycle. Do you want to read the file once and query it many times? Can the file change during queries? How much entries can be in such a file? Any solution that you will decide to use will be influence from such questions. with

Re: Query in pack and unpack functions

2007-05-03 Thread Dr.Ruud
Dharshana Eswaran schreef: $input = 23; #any decimal value $hex1 = sprintf (%x,$input); $binary = unpack 'B*', pack 'H*', $hex1; @fields1 = unpack 'A4A4', $binary; print $fields1[1] $fields1[0];# i need to print the Lower Nibble first and then the Higher nibble But this logic

Re: Query in pack and unpack functions

2007-05-03 Thread Dharshana Eswaran
Thank you Dr.Ruud. It solved my problem. :-) Thanks and Regards, Dharshana On 5/3/07, Dr.Ruud [EMAIL PROTECTED] wrote: Dharshana Eswaran schreef: $input = 23; #any decimal value $hex1 = sprintf (%x,$input); $binary = unpack 'B*', pack 'H*', $hex1; @fields1 = unpack 'A4A4', $binary;

Re: Query in pack and unpack functions

2007-05-03 Thread John W. Krahn
Dharshana Eswaran wrote: Hi All, Hello, My aim is to supply a hexadecimal value and print its binary value. I have written a small piece of code for the same: $input = 23; #any decimal value $hex1 = sprintf (%x,$input); $binary = unpack 'B*', pack 'H*', $hex1; @fields1 = unpack

Re: Query regarding seek and tell

2007-03-12 Thread Tom Phoenix
On 3/12/07, Beginner [EMAIL PROTECTED] wrote: When I ask for the filehandle position (tell) it is reporting the pointer as being a few bytes further along than I expect it to be. binmode(FH); while (FH) { If it's a binary file, you shouldn't read it by lines, which is what this does. You

Re: Query regarding seek and tell

2007-03-12 Thread Beginner
On 12 Mar 2007 at 9:34, Tom Phoenix wrote: On 3/12/07, Beginner [EMAIL PROTECTED] wrote: When I ask for the filehandle position (tell) it is reporting the pointer as being a few bytes further along than I expect it to be. binmode(FH); while (FH) { If it's a binary file, you

Re: Query regarding seek and tell

2007-03-12 Thread Rob Dixon
Beginner wrote: Hi, When I ask for the filehandle position (tell) it is reporting the pointer as being a few bytes further along than I expect it to be. For instance if I do this: #!/bin/perl use strict; use warnings; my ($start,$d,$var); my $file = 'myjpeg.jpg'; open(FH,$file) or die Can't

Re: Query regarding seek and tell

2007-03-12 Thread Tom Phoenix
On 3/12/07, Beginner [EMAIL PROTECTED] wrote: What I am tring to do is find the x and y dimension of a jpeg Ah, Image::Size. http://search.cpan.org/~rjray/Image-Size-3.01/lib/Image/Size.pm Enjoy! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For

Re: Query regarding seek and tell

2007-03-12 Thread Beginner
On 12 Mar 2007 at 10:49, Tom Phoenix wrote: On 3/12/07, Beginner [EMAIL PROTECTED] wrote: What I am tring to do is find the x and y dimension of a jpeg Ah, Image::Size. http://search.cpan.org/~rjray/Image-Size-3.01/lib/Image/Size.pm Enjoy! Image::size Image::Info and the

Re: Query on pattern matching

2007-03-09 Thread Rob Dixon
Dharshana Eswaran wrote: On 3/9/07, John W. Krahn [EMAIL PROTECTED] wrote: Chas Owens wrote: [snip] ( \w+ | \d+ | 0x[a-fA-F0-9] That only matches a single hexadecimal digit, you probably want

Re: Query on pattern matching

2007-03-08 Thread Chas Owens
On 3/8/07, Dharshana Eswaran [EMAIL PROTECTED] wrote: Hi all, I need to extract few strings from one file and paste it to another file. snip This doesn't seem like a good job for split. The split function is good for parsing X separated records where X is either constant or simple. What you

Re: Query on pattern matching

2007-03-08 Thread Rob Dixon
Dharshana Eswaran wrote: Hi all, I need to extract few strings from one file and paste it to another file. My source file, i.e., my .h file, contains statements like: #define GMMREG_ATTACH_REQ_ID (GMMREG_PRIM_ID_BASE) /* @LOG GMMREG_ATTACH_REQ */ #define

Re: Query on pattern matching

2007-03-08 Thread John W. Krahn
Chas Owens wrote: On 3/8/07, Dharshana Eswaran [EMAIL PROTECTED] wrote: I need to extract few strings from one file and paste it to another file. snip This doesn't seem like a good job for split. The split function is good for parsing X separated records where X is either constant or

Re: Query on pattern matching

2007-03-08 Thread Dharshana Eswaran
On 3/9/07, John W. Krahn [EMAIL PROTECTED] wrote: Chas Owens wrote: On 3/8/07, Dharshana Eswaran [EMAIL PROTECTED] wrote: I need to extract few strings from one file and paste it to another file. snip This doesn't seem like a good job for split. The split function is good for parsing X

Re: [query] Using a scalar variable with match operator

2007-01-03 Thread John W. Krahn
Deepak Barua wrote: Hi, Hello, I want to use a scalar variable with OR | operator embedded in the variable in a statement like $start_pattern = \/\* \| \/\/; if(m/$start_pattern/ || $continue == 1) { $chosen_pattern = $; Please inform me on how it is supposed to work..?

Re: [query] Using a scalar variable with match operator

2007-01-03 Thread Deepak Barua
Hi John, I don't understand the script seems very cryptic, could you explain my $start_pattern = qr!/\*|//!; Regards Deepak On 1/3/07, John W. Krahn [EMAIL PROTECTED] wrote: Deepak Barua wrote: Hi, Hello, I want to use a scalar variable with OR | operator embedded in the

Re: [query] Using a scalar variable with match operator

2007-01-03 Thread John W. Krahn
Deepak Barua wrote: On 1/3/07, John W. Krahn [EMAIL PROTECTED] wrote: Deepak Barua wrote: I want to use a scalar variable with OR | operator embedded in the variable in a statement like $start_pattern = \/\* \| \/\/; if(m/$start_pattern/ || $continue == 1) {

RE: Query

2006-05-19 Thread Nagasamudram, Prasanna Kumar
Hi Kaushal -w is to enable warning messages. Try running the following code to see the difference with and w/o -w. x.pl - $str=a+2; print $str,\n; - $ perl x.pl 2 $ perl -w x.pl Unquoted string a may clash with future reserved word at p2.pl line

Re: Query

2006-05-19 Thread Mr. Shawn H. Corey
On Fri, 2006-19-05 at 17:48 +0530, Kaushal Shriyan wrote: Hi All #!/usr/bin/perl -w whats -w flag stands for and what is its use, I mean How do i use it and any other flags are also there, Please specify The flags can be found in `perldoc perlrun`. -- __END__ Just my 0.0002 million

Re: Query

2006-05-19 Thread Dr.Ruud
Kaushal Shriyan schreef: #!/usr/bin/perl -w whats -w flag stands for and what is its use, I mean How do i use it and any other flags are also there, Please specify The Subject of your message doesn't cover your question, that is about the switches of the perl executable. From the prompt,

Re: Query on databases

2005-11-18 Thread Gayatri
] To: Gayatri [EMAIL PROTECTED]; beginners@perl.org Cc: Alfred Vahau [EMAIL PROTECTED] Sent: Friday, November 18, 2005 10:57 AM Subject: RE: Query on databases Hey Gayatri, This must be because your company provides internet service through proxy servers. If so, PPM will not work properly

Re: Query on databases

2005-11-18 Thread Michael Glaesemann
On Nov 18, 2005, at 18:56 , Gayatri wrote: $host = nnn.nn.nnn.nn; ## 'n' is a number, host is ip address. $databaseName = MyDatabase; $dbh = DBI-connect('DBI:mysql:database=$databaseName;host=$host', $userName, $password, {RaiseError = 1}) || die Can not connect to database $DBI::errstr;

Re: Query on databases

2005-11-18 Thread Gayatri
Yup tht was the prob Thanks for pointing it out :-) - Original Message - From: Michael Glaesemann [EMAIL PROTECTED] To: Gayatri [EMAIL PROTECTED] Cc: S, karthik (IE03x) [EMAIL PROTECTED]; beginners@perl.org Sent: Friday, November 18, 2005 3:41 PM Subject: Re: Query on databases

Re: Query on databases

2005-11-17 Thread Alfred Vahau
. But the installation guide doesnt work as spcified. Wht do i do? Im using Windows platform and Perl 5.8.6 Regards, Gayatri - Original Message - From: Michael David [EMAIL PROTECTED] To: Gayatri [EMAIL PROTECTED]; beginners@perl.org Sent: Wednesday, November 16, 2005 9:58 AM Subject: Re

Re: Query on databases

2005-11-17 Thread Gayatri
to ppm.ActiveState.com:80 (connect: Unknown error) Im connceted to the internet, then wht could be the problem and solution? Regards, Gayatri. - Original Message - From: Alfred Vahau [EMAIL PROTECTED] To: beginners@perl.org Sent: Friday, November 18, 2005 5:19 AM Subject: Re: Query on databases

RE: Query on databases

2005-11-17 Thread S, karthik \(IE03x\)
-mail and any printout thereof. -Original Message- From: Gayatri [mailto:[EMAIL PROTECTED] Sent: Friday, November 18, 2005 10:36 AM To: beginners@perl.org Cc: Alfred Vahau Subject: Re: Query on databases Thanks, I tried installing module using PPM. but its throwing following error As i

RE: Query on databases

2005-11-17 Thread Pant, Hridyesh
: Query on databases - Original Message - From: Gayatri [EMAIL PROTECTED] To: S, karthik (IE03x) [EMAIL PROTECTED] Sent: Friday, November 18, 2005 11:29 AM Subject: Re: Query on databases Hi Karthik, I downloaded DBD-Mysql frm the given location and i did following - ppm repository

Re: Query on databases

2005-11-17 Thread Gayatri
Hi, Thanks a lot for yr kind help :-) It worked finally :-) Regards, Gayatri. - Original Message - From: Pant, Hridyesh [EMAIL PROTECTED] To: 'Gayatri' [EMAIL PROTECTED]; beginners@perl.org Sent: Friday, November 18, 2005 12:27 PM Subject: RE: Query on databases Hi, Pls try it Unzip

Re: Query on databases

2005-11-16 Thread Gayatri
- Original Message - From: Michael David [EMAIL PROTECTED] To: Gayatri [EMAIL PROTECTED]; beginners@perl.org Sent: Wednesday, November 16, 2005 9:58 AM Subject: Re: Query on databases - Original Message - From: Gayatri [EMAIL PROTECTED] To: beginners@perl.org Sent: Wednesday

Re: Query on sendmail problem

2005-10-07 Thread Scott R. Godin
Dale wrote: Hi, I'm hoping someone can help me with an issue I've got with, I assume, sendmail. I've copied part of a script below. If I use the first To: line (which takes the e-mail address from a file - and this works) then a mail doesn't arrive. If, however, I used the second To: line

Re: Query on sendmail problem

2005-10-05 Thread Wiggins d'Anconia
Dale wrote: Hi, I'm hoping someone can help me with an issue I've got with, I assume, sendmail. I've copied part of a script below. If I use the first To: line (which takes the e-mail address from a file - and this works) then a mail doesn't arrive. If, however, I used the second To:

RE: query about hash

2005-07-16 Thread arjun.mallik
Arjun Deserve before you desire -Original Message- From: Jeff 'japhy' Pinyan [mailto:[EMAIL PROTECTED] Sent: Friday, July 15, 2005 9:22 PM To: Mallik Arjun (WT01 - TELECOM SOLUTIONS) Cc: beginners@perl.org Subject: Re: query about hash On Jul 15, [EMAIL PROTECTED] said: foreach

Re: query about hash

2005-07-15 Thread Jeff 'japhy' Pinyan
On Jul 15, [EMAIL PROTECTED] said: foreach $cluster ( @{$schedules-{$DAY-[friday]}-{STRUCT}} ) from $cluster i have to extract cluster number and version. How can i do that ?? Output is like below. - extract is HASH(0x4033d910) From this 2 values are to be retrived . upload

RE: Query about ssh from perl program

2005-07-08 Thread Moon, John
Subject: Query about ssh from perl program Hello All, I have a query about using ssh programmatically. I tried using both system and exec, but didn't work. I mean, I wanted some processing to happen on the remote machine to which i connect with ssh, which is not happening. I have copied the

RE: Query about ssh from perl program

2005-07-08 Thread Dhanashri Bhate
Hello John, Thank you very much! I made changes as per your inputs and it worked, Thanks again, Dhanashri - -Original Message- - From: Moon, John [mailto:[EMAIL PROTECTED] - Sent: Friday, July 08, 2005 4:21 PM - To: Dhanashri Bhate; beginners@perl.org - Subject: RE: Query about ssh

Re: Query on File::Find

2005-07-07 Thread John Doe
Shobha Deepthi am Donnerstag, 7. Juli 2005 06.19: Hi, Hi probably not the best answer, but nobody else answered: Am using find method in File::Find module. Right now this method is being used as follows: find({wanted = \find_and_instantiate_commav_file, no_chdir

Re: Query on File::Find

2005-07-07 Thread Jeff 'japhy' Pinyan
On Jul 7, Shobha Deepthi said: But I want to pass another parameter to find_and_instantiate_commav_file subroutine. I tried, find({wanted = \find_and_instantiate_commav_file(some_value), no_chdir = 0}, $spec_entry); The syntax \function returns a

Re: Query on File::Find

2005-07-07 Thread Shobha Deepthi
Hi Jeff, Thanks for your help. That really worked! Shobha Deepthi V The statement below is true. The statement above is false. Jeff 'japhy' Pinyan wrote: On Jul 7, Shobha Deepthi said: But I want to pass another parameter to find_and_instantiate_commav_file subroutine. I tried,

Re: query

2005-07-07 Thread Chris Devers
On Thu, 7 Jul 2005, madhurima das wrote: I have the following problem: Yes. We saw it each of the previous times you posted it. While you were posting this message twice and another one three times -- please don't ever do that again, by the way, thanks -- you got back several useful

RE: query

2005-07-07 Thread Thomas Bätzler
madhurima das [EMAIL PROTECTED] wrote: I have the following problem: Looks like the previous time you posted this. [...] my @z = system(assign.f,'$x','$y'); [...] Read the perlfunc manpage on system. 1. system does return a scalar. 2. that scalar is not the output of the program you

RE: Query string to URL?

2005-03-08 Thread Jan Eden
Chris Devers wrote on 07.03.2005: On Mon, 7 Mar 2005, Jan Eden wrote: But I need some rule to do this: http://mysite.com/pages?id=1234 - http://mysite.com/pages/1234 And since mod_rewrite does not parse the query string, I have a problem here. So use redirect instead of rewrite:

RE: Query string to URL?

2005-03-07 Thread Jan Eden
Hi Thomas, Thomas Bätzler wrote on 07.03.2005: I need to translate a URL with a POST query string into a URL like this: http://mysite.com/pages?id=1234 should become http://mysite.com/pages/1234 OTTOH: RewriteRule ^/pages/([^/]+)/?$/pages?id=$1 [QSA,NS,L] Or even easier, leave your

RE: Query string to URL?

2005-03-07 Thread Chris Devers
On Mon, 7 Mar 2005, Jan Eden wrote: But I need some rule to do this: http://mysite.com/pages?id=1234 - http://mysite.com/pages/1234 And since mod_rewrite does not parse the query string, I have a problem here. So use redirect instead of rewrite: RedirectMatch /pages?id=(.*)

Re: Query on Split

2004-06-12 Thread Rob Dixon
John W. Krahn wrote: Sudhindra K S wrote: Hi Hello, I have a file with lines as shown below //abc/... - //xyz/... //abc1/... - //xyz1/... Now i want to split the lines at - and get the string on the left in one array and the string on the right in another array. ie:

  1   2   >