Re: Re: Perl file exists check

2016-11-10 Thread jaceke
This example will be better : #!/usr/bin/perl use strict; use File::Basename; use utf8; sub escMe($) { my $f1 = shift; my $f2 = '/etc/passwd'; my $f3 = "'/etc/passwd'"; my $f4 = '/etc/passwd'; $f1 = "'" . $f1 . "'"; if($f1 eq $f2) { print("Files are same $f1$f2\n"); } else { print("Files are N

Re: Re: Perl file exists check

2016-11-10 Thread jaceke
#!/usr/bin/perl use strict; use File::Basename; use utf8; sub escMe($) { my $f1 = shift; my $f2 = '/etc/passwd'; my $f2 = "'/etc/passwd'"; my $f3 = '/etc/passwd'; $f1 = "'" . $f1 . "'"; if($f1 eq $f2) { print("Files are same $f1$f2\n"); } else { print("Files are NOT same $f1$f2\n"); } if (-e $

Re: Re-exec in perl

2016-10-04 Thread X Dungeness
On Tue, Oct 4, 2016 at 2:07 PM, X Dungeness wrote: > Here's a possibly relevant note in the docs for both "alarm" and > "sleep": > > It is usually a mistake to intermix "alarm" and "sleep" calls, > because "sleep" may be internally implemented on your system > with "alarm". > > > It

Re: Re-exec in perl

2016-10-04 Thread X Dungeness
Here's a possibly relevant note in the docs for both "alarm" and "sleep": It is usually a mistake to intermix "alarm" and "sleep" calls, because "sleep" may be internally implemented on your system with "alarm". On Tue, Oct 4, 2016 at 1:34 PM, Chas. Owens wrote: > The first alarm

Re: Re-exec in perl

2016-10-04 Thread Chas. Owens
The first alarm is in a different process (same PID different process) due to the exec. I am not sure what is happening, but in general it is never a good idea to do anything complex in a signal handler. On Tue, Oct 4, 2016 at 4:21 PM Shawn H Corey wrote: > On Tue, 04 Oct 2016 19:32:44 + >

Re: Re-exec in perl

2016-10-04 Thread Shawn H Corey
On Tue, 04 Oct 2016 19:32:44 + "Chas. Owens" wrote: > It looks like the problem exists at the C level as well. This code > doesn't work past the first alarm: Doesn't it say the alarm has to be reset by the code in the documentation? After all, you don't want a second alarm to go off before

Re: Re-exec in perl

2016-10-04 Thread Chas. Owens
It looks like the problem exists at the C level as well. This code doesn't work past the first alarm: #include #include #include #include #include int n; char s[10]; char* prog; int alarm_called = 0; void handle_alrm(int signo) { if (signo == SIGALRM) { execv(prog, (char*[]) { prog, s, NU

Re: Re-exec in perl

2016-10-04 Thread Chas. Owens
First, never use -w flag to enable warnings; use the warnings pragma instead. Second, you should not exec the script directly, you don't know if it is executable or not, and it could even wind up running under a different version of perl. Instead, you should exec same the interpreter that is runn

Re: Re[2]: Need something like macro

2015-03-09 Thread Kent Fredric
On 10 March 2015 at 09:01, John SJ Anderson wrote: > And the average latency of the network connection you're serving this > captcha over is... ? Its probably a bigger issue if you have > 2,000 customers at any time fetching captchas =). But the question is more "Not is the subroutine slower"

Re: Re[2]: Need something like macro

2015-03-09 Thread John SJ Anderson
On Mon, Mar 9, 2015 at 12:48 PM, Артём Варнайский wrote: Execution time of inline variant approximately 17.6ms, subroutine solution > slower about 26%. My script is captcha generator. Random sign used very > often during execution. I think 26% is a lot enough in this case. > > And the average lat

RE: Re: Regular expression: option match after a greedy/non-greedy match

2014-09-17 Thread Viet-Duc Le
Dear Jing, I was confused when I started out the regular expression. Many thanks for the kind and detailed explanation. After reading more on perl regex, I think I have a better grasp of the greedy/non-greedy concept now. Your code also worked well for my task. Regards, Viet-Duc -

Re: Re[2]: Where's this documented?

2014-03-19 Thread Brian Fraser
On Wed, Mar 19, 2014 at 10:37 AM, shawn wilson wrote: > On Wed, Mar 19, 2014 at 4:21 AM, Yonghua Peng wrote: > > From perldoc -f stat: > > > > If "stat" is passed the special filehandle consisting of an underline, no > > stat is done, but the current > > contents of the stat structure from the l

Re: Re[2]: Where's this documented?

2014-03-19 Thread shawn wilson
On Wed, Mar 19, 2014 at 4:21 AM, Yonghua Peng wrote: > From perldoc -f stat: > > If "stat" is passed the special filehandle consisting of an underline, no > stat is done, but the current > contents of the stat structure from the last "stat", "lstat", or filetest > are returned. Example: > > if (-x

Re: re-reading from already read file handle

2012-09-02 Thread Dr.Ruud
On 2012-08-20 22:39, Rajeev Prasad wrote: just want to find out in how many records string was found: my $count=0; seek $tmp_FH,0,0; while (<$tmp_FH>) { my $line=$_;chomp($line); if ($line=~m/\"$str\"/) {$coun

Re: re-reading from already read file handle

2012-08-20 Thread Bill Stephenson
On Aug 20, 2012, at 7:24 PM, John SJ Anderson wrote: > On Monday, August 20, 2012 at 4:15 PM, Rob Dixon wrote: >> >> This question is double-posted on Stack Overflow >> > So what? I don't see anything in the list FAQ about cross-posting questions > to other resources, just about cross-posting a

Re: re-reading from already read file handle

2012-08-20 Thread John SJ Anderson
On Monday, August 20, 2012 at 4:15 PM, Rob Dixon wrote: > > This question is double-posted on Stack Overflow > So what? I don't see anything in the list FAQ about cross-posting questions to other resources, just about cross-posting across the different beginner mailing lists. john. -- John

Re: re-reading from already read file handle

2012-08-20 Thread Rajeev Prasad
, August 20, 2012 6:15 PM Subject: Re: re-reading from already read file handle Rajeev Prasad wrote: >I opened a file to read from line by line. > > >open(FH,"<","$myfile") or die "could not open $myfile: $!"; >while () >{ >...do somethin

Re: re-reading from already read file handle

2012-08-20 Thread Rob Dixon
Rajeev Prasad wrote: >I opened a file to read from line by line. > > >open(FH,"<","$myfile") or die "could not open $myfile: $!"; >while () >{ >...do something > >} > >later on in program, try to re-read the file (walk thru the file >again): >while () >{ >...do something > >} > >and realized tha

Re: re-reading from already read file handle

2012-08-20 Thread Jim Gibson
On Aug 20, 2012, at 3:32 PM, Rajeev Prasad wrote: > Thx. I did some timestamp prints from within script, this piece is taking too > long: almost 5 minutes to complete...!!! > > fyi, the strArr array contains about 1500 string elements. (this loop runs > that many times) > the file tmp_FH_SR i

Re: re-reading from already read file handle

2012-08-20 Thread Rajeev Prasad
\"$tmp_str\"/) {$count++;}                 }                 if($count == 1){push(@another_str_arr,$str);}             }         } how can i make it faster? read the 27mb and 13mb files in an array one time and work? From: Jim Gibson To: perl list Sent: Monday, August 20, 2012 4:04

Re: re-reading from already read file handle

2012-08-20 Thread Jim Gibson
On Aug 20, 2012, at 1:39 PM, Rajeev Prasad wrote: > thank you. seek did the job. > > by the way can this be made any better? > > just want to find out in how many records string was found: > > my $count=0; > seek $tmp_FH,0,0; > while (<$tmp_FH>) >

Re: re-reading from already read file handle

2012-08-20 Thread Shawn H Corey
On Mon, 20 Aug 2012 13:39:16 -0700 (PDT) Rajeev Prasad wrote: >             my $count=0; >             seek $tmp_FH,0,0; >             while (<$tmp_FH>) >             { >                 my $line=$_;chomp($line); # Please put each statement on its own line >                 if ($line=~m/\"$str\

Re: re-reading from already read file handle

2012-08-20 Thread Rajeev Prasad
($line=~m/\"$str\"/) {$count++;}        #in the file $str string would be in quotes             } From: Andy Bach To: Rajeev Prasad Cc: perl list Sent: Monday, August 20, 2012 2:10 PM Subject: Re: re-reading from already read file handle

Re: re-reading from already read file handle

2012-08-20 Thread Shawn H Corey
On Mon, 20 Aug 2012 12:00:55 -0700 (PDT) Rajeev Prasad wrote: > open(FH,"<","$myfile") or die "could not open $myfile: $!"; # You should used a my variable for the file handle open(my $fh,"<","$myfile") or die "could not open $myfile: $!"; > while () # with the my variable file handle while (<

Re: re-reading from already read file handle

2012-08-20 Thread Andy Bach
On Mon, Aug 20, 2012 at 2:00 PM, Rajeev Prasad wrote: > is this default behaviour? how to work around this? file is big and I do not > want to keep in memory as array. so is my only option is to close and open > the file again? Yes, that's the default. "seek" lets you reset things though perldo

Re: Re: how to use jks encrypt in perl webservice

2011-08-08 Thread 王璟
yes,i use SOAP::Lite,but i need jks encrypt and i cannt find the example in google 2011-08-08 王璟 发件人: Feng He 发送时间: 2011-08-08 18:23:42 收件人: 王璟 抄送: beginners 主题: Re: how to use jks encrypt in perl webservice Have you tried SOAP::Lite? 2011/8/8 王璟 : > My service is published by J2EE

Re: Re : Re: Re : Re: Re : Re: Check if words are in uppercase?

2011-06-21 Thread Rob Dixon
On 21/06/2011 15:01, Bob McConnell wrote: From: Paul Johnson On Tue, Jun 21, 2011 at 05:57:22AM -0700, Beware wrote: Hi to all, First of all, sorry for the late of my answer. Thank for all your sentence. Here's my solution (for now) : for my $w (@keywords) { if ( /\b$w\b/ a

Re: Re : Re: Re : Re: Re : Re: Check if words are in uppercase?

2011-06-21 Thread Paul Johnson
On Tue, Jun 21, 2011 at 10:01:17AM -0400, Bob McConnell wrote: > From: Paul Johnson > > > On Tue, Jun 21, 2011 at 05:57:22AM -0700, Beware wrote: > > > > > Hi to all, > >> > >> First of all, sorry for the late of my answer. > >> Thank for all your sentence. > >> > >> Here's my solution (for now

RE: Re : Re: Re : Re: Re : Re: Check if words are in uppercase?

2011-06-21 Thread Bob McConnell
From: Paul Johnson > On Tue, Jun 21, 2011 at 05:57:22AM -0700, Beware wrote: > > > Hi to all, >> >> First of all, sorry for the late of my answer. >> Thank for all your sentence. >> >> Here's my solution (for now) : >> >> for my $w (@keywords) >> { >> if ( /\b$w\b/ and !/\buc($w

Re: Re : Re: Re : Re: Re : Re: Check if words are in uppercase?

2011-06-21 Thread Paul Johnson
On Tue, Jun 21, 2011 at 05:57:22AM -0700, Beware wrote: > Hi to all, > > First of all, sorry for the late of my answer. > Thank for all your sentence. > > Here's my solution (for now) : > > for my $w (@keywords) > { > if ( /\b$w\b/ and !/\buc($w)\b/ ) > { > p

Re : Re: Re : Re: Re : Re: Check if words are in uppercase?

2011-06-21 Thread Beware
Hi to all, First of all, sorry for the late of my answer. Thank for all your sentence. Here's my solution (for now) : for my $w (@keywords) { if ( /\b$w\b/ and !/\buc($w)\b/ ) { print "Keyword '$w' not uppercase line $.\n"; ajoute_erreur( 7, $. );

Re: Re : Re: Re : Re: Check if words are in uppercase?

2011-06-17 Thread Brandon McCaig
On Wed, Jun 15, 2011 at 12:09 PM, Jim Gibson wrote: > '$w eq $w' is always true. It certainly is more sane when that holds true, but to have a little fun there is overload. ;D use strict; use warnings; use overload '==' => sub { return 0; }; my $foo = bless {}; print $foo == $foo; __END__

Re: Re : Re: Re : Re: Check if words are in uppercase?

2011-06-15 Thread Rob Dixon
On 15/06/2011 17:09, Jim Gibson wrote: On 6/15/11 Wed Jun 15, 2011 8:20 AM, "Rob Dixon" scribbled: I am afraid that will not work. $w is extracted from the input line and may contain lower-case letters. You must compare $w to uc $w to see if it contains any lower-case letters. '$w eq $w' is

Re: Re : Re: Re : Re: Check if words are in uppercase?

2011-06-15 Thread Jim Gibson
On 6/15/11 Wed Jun 15, 2011 8:20 AM, "Rob Dixon" scribbled: > On 15/06/2011 16:02, Jim Gibson wrote: >> At 12:38 PM +0100 6/15/11, Rob Dixon wrote: >>> On 15/06/2011 12:10, Paul Johnson wrote: On Tue, Jun 14, 2011 at 11:56:04PM -0700, Beware wrote: > Hi > > Sorry, i've been ti

Re: Re : Re: Re : Re: Check if words are in uppercase?

2011-06-15 Thread Rob Dixon
On 15/06/2011 16:02, Jim Gibson wrote: At 12:38 PM +0100 6/15/11, Rob Dixon wrote: On 15/06/2011 12:10, Paul Johnson wrote: On Tue, Jun 14, 2011 at 11:56:04PM -0700, Beware wrote: Hi Sorry, i've been tired these past days. So, this is what i want to do : I've source code files in VHDL. I wa

Re: Re : Re: Re : Re: Check if words are in uppercase?

2011-06-15 Thread Jim Gibson
At 12:38 PM +0100 6/15/11, Rob Dixon wrote: On 15/06/2011 12:10, Paul Johnson wrote: On Tue, Jun 14, 2011 at 11:56:04PM -0700, Beware wrote: Hi Sorry, i've been tired these past days. So, this is what i want to do : I've source code files in VHDL. I want to check that all specific keywords

Re: Re : Re: Re : Re: Check if words are in uppercase?

2011-06-15 Thread John W. Krahn
Rob Dixon wrote: On 15/06/2011 12:10, Paul Johnson wrote: #!/usr/bin/perl use strict; use warnings; my @keywords = qw ( abs access after alias all and architecture array assert attribute begin block body buffer bus case component configuration constant disconnect downto else elsif end entity

Re: Re : Re: Re : Re: Check if words are in uppercase?

2011-06-15 Thread Rob Dixon
On 15/06/2011 12:10, Paul Johnson wrote: On Tue, Jun 14, 2011 at 11:56:04PM -0700, Beware wrote: Hi Sorry, i've been tired these past days. So, this is what i want to do : I've source code files in VHDL. I want to check that all specific keywords of this language are in uppercase. In fact,

Re: Re : Re: Re : Re: Check if words are in uppercase?

2011-06-15 Thread Paul Johnson
On Tue, Jun 14, 2011 at 11:56:04PM -0700, Beware wrote: > Hi > > Sorry, i've been tired these past days. > > So, this is what i want to do : > > I've source code files in VHDL. I want to check that all specific keywords of > this language are in uppercase. > > In fact, in my current script i r

Re : Re: Re : Re: Check if words are in uppercase?

2011-06-14 Thread Beware
Hi Sorry, i've been tired these past days. So, this is what i want to do : I've source code files in VHDL. I want to check that all specific keywords of this language are in uppercase. In fact, in my current script i read this file line per line and check others rules. Am i clear, now? --

Re: Re : Re: Check if words are in uppercase?

2011-06-14 Thread Jim Gibson
On 6/14/11 Tue Jun 14, 2011 7:47 AM, "Beware" scribbled: > Hi and thank you for your answer. > > But how can i use it with a list of word. > Use what? You need to put a little context in your messages so people can help you without seeing previous messages. If you have a list of words in a

Re : Re: Check if words are in uppercase?

2011-06-14 Thread Beware
Hi and thank you for your answer. But how can i use it with a list of word. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

RE: Re[2]: about return

2011-02-10 Thread Alex Wang02
Terry, Here is my understanding: You can try defined function to verify the return value in List context, you can find the return value is (undef) instead of undef once the condition is false. Because you are using @result=&yoursubName instead of $result=&yoursubName. Please correct me if I w

Re: Re: perl training material and excercises for freshers

2011-01-04 Thread Martin Jones
Hi Sunita, Whilst it's not designed to be initial learning material, I prepared a Perl booklet to be handed out at the end of a Perl course. It's more to provide a model (not 100% accurate!) of how things work, mostly explaining things in diagrams. You can download it here: http://www.igniti

Re: Re: smart match question

2010-11-27 Thread Téssio Fechine
I'm running perl 5.10! -- perl -v This is perl, v5.10.1 (*) built for i486-linux-gnu-thread-multi -- A think it's no longer true then: "The smart match operator is commutative, which you may remember from high school algebra as the fancy way to say that the order of the operands doesn’t matter.

Re: Re: checking if a file is in use

2010-11-02 Thread perl_haxor 123
Hi All, Thanks a lot for the suggestion, It looks like flock is used if my perl script want to lock a file, In this case the perl script would be copying files from one directory to an another one, but some process (let say xyz process) might be using these files, in that case i don't wa

Re: Re: escape quotes in GREP

2009-11-30 Thread juliaaaa . 1
Thanks everyone for the help!!! really useful!!! On Nov 30, 2009 1:48am, lan messerschmidt wrote: On Mon, Nov 30, 2009 at 3:46 PM, Uri Guttman u...@stemsystems.com> wrote: > > what is [^()]* looking for? why couldn't () be inside the div tags? > Well, it's the OP's idea, not m

Re: Re: Looking for advise on storring a complex array

2009-11-18 Thread Rob Coops
On Wed, Nov 18, 2009 at 1:53 PM, Jeff Pang wrote: > For SQLite, just perl -MCPAN -e 'install DBD::SQLite', then use the general > DBI to create and access SQLite database. > you even don't need to install SQLite binary program. > > On Nov 18, 2009, Dermot wrote: > > 2009/11/18 Rob Coops : > > On

Re: Re: Looking for advise on storring a complex array

2009-11-18 Thread Jeff Pang
For SQLite, just perl -MCPAN -e 'install DBD::SQLite', then use the general DBI to create and access SQLite database. you even don't need to install SQLite binary program. On Nov 18, 2009, Dermot wrote: 2009/11/18 Rob Coops : > On Mon, Nov 16, 2009 at 10:09 PM, Rene Schickbauer < > rene.schick

Re: Re: return {}->{'name'};

2009-11-14 Thread Jeff Pang
On Nov 15, 2009, Uri Guttman wrote: > "PK" == Parag Kalra writes: >and yes, that is declaring a constant. you can tell it is a hash as it >is initialized to a hash reference. it makes little sense to me why you >would declare such a beast as the reference can have its contents >altered a

Re: Re: how to do a `cp` on millions of files

2009-09-29 Thread xufengnju
When It comes with million of files to copy from one place to another,there are two considerations: 1,performance 2,repeatable(fault tolerance),when it fails in-middle,it can continue with uncopied files.`cp -R` will not be ok for this because it begains from the very start, and `rsync` is good

RE: Re: Perl code for comparing two files

2009-05-09 Thread Wagner, David --- Senior Programmer Analyst --- CFS
> -Original Message- > From: news [mailto:n...@ger.gmane.org] On Behalf Of Richard Loveland > Sent: Friday, May 08, 2009 11:59 > To: beginners@perl.org > Subject: Re: Perl code for comparing two files > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Mr. Adhikary, > > The following

Re: Re: Acepting default value for user input

2009-02-27 Thread Chas. Owens
On Fri, Feb 27, 2009 at 11:16, wrote: > Hi people!! > > I´m using Perl for the first time in my Mac OS X... > > > How can I check installed modules ??? > > > I am running a Mac OS X Leopard 10.5.6 with Perl version v5.8.8 built for > darwin-thread-multi-2level... > > > Thanks > Please do not

Re: Re: Acepting default value for user input

2009-02-27 Thread juliaaaa . 1
Hi people!! I´m using Perl for the first time in my Mac OS X... How can I check installed modules ??? I am running a Mac OS X Leopard 10.5.6 with Perl version v5.8.8 built for darwin-thread-multi-2level... Thanks

Re: Re: Cannot open file to read after creation

2008-12-03 Thread askew . blake
John, Thanks for the help. I have made the changes you suggested. However, now the irc subroutine is always called. For example, if I give the port as 80 and nmap identifies http running, it still calls the irc subroutine. It should only call the irc subroutine if nmap identifies the port a

Re: Re: Net::ftp

2008-11-01 Thread ringlink
or consider to use rsync tool, that's simple and effective enough. - Original Message - From: Dermot To: [EMAIL PROTECTED] Subject: Re: Net::ftp Date: 2008-11-2 05:45:32 2008/11/1 [EMAIL PROTECTED] : You nearly had in. I think you assumed that you could copy a directory and it's files

Re: Re: how to read the formatted data from the file?

2008-07-15 Thread bin . lv
In fact, sscanf belongs to the String::Scanf, when I install this module,program works ok. thank you all the same! 2008/7/14 Amit Saxena <[EMAIL PROTECTED]>: > You need not to call any specific module for sscanf. > > Could you tell me the line number where perl complains ? > > Also please post y

Re: Re: Re: @INC and cross-platform path usage

2008-07-02 Thread Jenda Krynicky
From: "Amit Saxena" <[EMAIL PROTECTED]> > I still doubt whether > > * unshift (@INC,$librarydir);* > > works or not. > > To the best I have read the articles and tutorials, @INC can't be updated in > this way. Then you've read them wrong. Of course you can use unshift() on @INC, you just have

Re: Re: Re: @INC and cross-platform path usage

2008-07-02 Thread Tobias Eichner
Giving it a closer look, I experience a strange behaviour. I'm using ActiveState Perl on WinXp here. The following script has been used for testing: use File::Spec; BEGIN { my ($volume,$softwaredir,$librarydir); ($volume,$softwaredir) = File::Spec->splitpath(__FILE__); $libraryd

Re: Re: Re: @INC and cross-platform path usage

2008-07-02 Thread Tobias Eichner
> * unshift (@INC,$librarydir);* ... > To the best I have read the articles and tutorials, @INC can't be updated in > this way. What I read about is that paths can't be deleted easily from @INC, but I haven' tried it yet (since I don't see an application deleting a path that others have set at @

Re: Re: Re: @INC and cross-platform path usage

2008-07-02 Thread Amit Saxena
Hi I still doubt whether * unshift (@INC,$librarydir);* works or not. To the best I have read the articles and tutorials, @INC can't be updated in this way. You have to either use one of the options below :- - *PERL5LIB* environment variable - using *use lib ("")* construct - use *Fi

Re: Re: Re: @INC and cross-platform path usage

2008-07-02 Thread Tobias Eichner
I wrote the following script that fits my needs; maybe someone finds it useful, maybe someone finds an error in it (if so, let me know - I tested it on OS X and Win XP): use File::Spec; my ($volume,$softwaredir,$librarydir); ($volume,$softwaredir) = File::Spec->splitpath(__FILE__); $librarydir

Re: Re: CGI FORM action

2008-06-16 Thread ken uhl
Thanks for replying Gunnar, to your first Q ; ' maybe I did swap name and value - - ' I don't see how that could make a difference if the param retrieval code on the line following page print command never is executed. - I'll try swapping that around, and post results. The mystery of page

Re: Re: CSV duplicate

2008-04-19 Thread Chas. Owens
On Sat, Apr 19, 2008 at 2:21 PM, Manoj <[EMAIL PROTECTED]> wrote: > Thanks Jeff... :) > Is this all mentioned in any Perl books? snip You can find information about HoH (hash of hashes) and other advanced data structures in The Camel*, The Llama**, and the docs that come with Perl***. * http://w

RE: Re: CSV duplicate

2008-04-19 Thread Manoj
Thanks Jeff... :) Is this all mentioned in any Perl books? -Original Message- From: Jeff Pang [mailto:[EMAIL PROTECTED] Sent: Saturday, April 19, 2008 8:47 AM To: Perl Beginners Subject: Re:Re: CSV duplicate =Original Message= >From :[EMAIL PROTECTED]; >To :John W. Krahn <[EMA

Re: RE: setting unix command through perl script

2008-04-18 Thread Chas. Owens
On Sat, Apr 19, 2008 at 12:14 AM, Mike Flannigan <[EMAIL PROTECTED]> wrote: > > What ever happened to trimming the posts to a reasonable > number of quoted messages? In the old days regulars > would have made your life miserable for this kind of > transgression. I guess since this is a beginn

Re: RE: setting unix command through perl script

2008-04-18 Thread Mike Flannigan
What ever happened to trimming the posts to a reasonable number of quoted messages? In the old days regulars would have made your life miserable for this kind of transgression. I guess since this is a beginners list we are much more tolerant nowadays. Mike On Thu, 17 Apr 2008, [EMAIL PROTEC

Re: RE

2007-10-18 Thread Chas. Owens
On 10/18/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hi, > Comment me if there is any mistake of mine please? > Even the @weekdays doen't yield all the days instead it > yields the combination of three days... snip > my @weekdays = join '|', qw; > my @months = join '|', qw; snip That is b

Re: RE

2007-10-17 Thread Dyana Wu
On 18 Oct 2007, at 12:55 PM, [EMAIL PROTECTED] wrote: -snip- Even the @weekdays doen't yield all the days instead it yields the combination of three days... my @weekdays = join '|', qw; my @months = join '|', qw; print @weekdays; -snip- Er, because is not a valid range in Perl. Example

Re: RE

2007-10-17 Thread neelike
Hi, Comment me if there is any mistake of mine please? Even the @weekdays doen't yield all the days instead it yields the combination of three days... Thanks yar Boniface - #!/usr/bin/perl open DAT,") { #print $line,"\n"; my @weekdays = join '|', qw; my @mo

Re: RE

2007-10-17 Thread Chas. Owens
On 10/17/07, Jenda Krynicky <[EMAIL PROTECTED]> wrote: > From: "Chas. Owens" <[EMAIL PROTECTED]> > > which can be implemented like this > > > > my @weekdays = join '|', qw; > > my @months = join '|', qw; > > > > /Start date (?:@weekdays), ((?:@months) \d{2} \d{4})/; > > I think you mean $weekdays a

Re: RE

2007-10-17 Thread Jenda Krynicky
From: "Chas. Owens" <[EMAIL PROTECTED]> > which can be implemented like this > > my @weekdays = join '|', qw; > my @months = join '|', qw; > > /Start date (?:@weekdays), ((?:@months) \d{2} \d{4})/; I think you mean $weekdays and $months :-) It works with the @ as well, but it's misleading. There

Re: RE

2007-10-17 Thread Chas. Owens
On 10/17/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > > 1 per 1 guest > > > Start date Monday, March 12 2007 > > End date Tuesday, March 13 2007 > > > My html page looks like as given above. And my RE to > capture the dates are given below. Kindly suggest me the

Re: Re: How to set environment variable

2007-09-27 Thread Jeff Pang
28 Sep 2007 03:45:54 -, vikram vikram vikram <[EMAIL PROTECTED]>: > > > > Hi All, > > Yes i tried by copying the file to .env and executed the .env. > > But still the environment variable is not set. Please suggest some > solution for setting the environment variable. May be some

Re: RE: White space split

2007-09-20 Thread Chas Owens
On 9/20/07, Dr.Ruud <[EMAIL PROTECTED]> wrote: > Andrew Curry schreef: > > > (split/\s+/,$cmd) > > Very often, (split ' ', $cmd) is the better alternative. snip For the uninitiated: split ' ', $string does what split /\s+/, $string does, but also removes leading whitespace. The following code pri

Re: RE: White space split

2007-09-20 Thread Dr.Ruud
Andrew Curry schreef: > (split/\s+/,$cmd) Very often, (split ' ', $cmd) is the better alternative. -- Affijn, Ruud "Gewoon is een tijger." -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: RE: White space split

2007-09-20 Thread useperl-jeff
--- yitzle <[EMAIL PROTECTED]> wrote: > Note: split splits on whitespace by default, so these two are the same: > split /\s+/, @array; > split @array; > Not right.You split a string,not an array or a list. all below are wrong: split @array; split (11,22,33); split $string; see `perldoc -f spli

Re: RE: White space split

2007-09-20 Thread yitzle
Note: split splits on whitespace by default, so these two are the same: split /\s+/, @array; split @array; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: RE: White space split

2007-09-20 Thread manojkumarg
Yep...I got it !! .. - Original Message - From: [EMAIL PROTECTED] Date: Thursday, September 20, 2007 5:44 pm Subject: Re: RE: White space split To: [EMAIL PROTECTED], Andrew Curry <[EMAIL PROTECTED]> Cc: beginners@perl.org > --- [EMAIL PROTECTED] wrote: > > >

RE: RE: White space split

2007-09-20 Thread Andrew Curry
Try my $cmd1 = (split/\s+/,$cmd)[0]; -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 20 September 2007 13:04 To: [EMAIL PROTECTED]; Andrew Curry Cc: beginners@perl.org Subject: Re: RE: White space split --- [EMAIL PROTECTED] wrote: > Thanks Andrew

Re: RE: White space split

2007-09-20 Thread useperl-jeff
--- [EMAIL PROTECTED] wrote: > Thanks Andrew and Jeff. > ($cmd1, $rest)=split/\s+/,cmd$; worked for me. > my ($cmd1) = split/\s+/,$cmd; is still giving me the length... > I wanted to use something like above ... you may type something wrong?see the test, $ cat t3.pl my $cmd = "maheshverama

Re: RE: White space split

2007-09-20 Thread manojkumarg
Thanks Andrew and Jeff. ($cmd1, $rest)=split/\s+/,cmd$; worked for me. my ($cmd1) = split/\s+/,$cmd; is still giving me the length... I wanted to use something like above ... Jeff, Is there any thing else I need to change in the line... Thanks - Original Message - From: Andrew Curry <[

Re: Re: create a uft8 file

2007-08-31 Thread kenpeng
- original Nachricht Betreff: Re: create a uft8 file Gesendet: Fr 31 Aug 2007 21:08:08 CEST Von: "Chas Owens"<[EMAIL PROTECTED]> > On 8/31/07, Digger <[EMAIL PROTECTED]> wrote: > > Hello, > > > > I want to create an utf8 file and write some content (like html codes) to > it. > > How

Re: Re: Array of Array refs @ 1180470274

2007-05-29 Thread Johan Meskens CS3 jmcs3
Intrah onat Diria .. , ** wrote "Revera y": > > > Changing @ to $ is confusing... this is different in perl6 , the following could be unreadable @ 1180470350 ::: hbeingspiel , 0::- , 1::',| , 0::| , 1::ver

Re: Re[2]: Porting a Script from Linux to Win32

2007-03-22 Thread Chas Owens
On 3/23/07, Richard Luckhurst <[EMAIL PROTECTED]> wrote: snip y> Check that the full file path is valid on the Windows system. y> In general, Unix uses / and Windows uses \. Under eg cygwin I think it uses y> /, but check the path works right. I am aware of the path differences and I had tried t

RE: Re: Installing modules locally, how to

2007-02-20 Thread Moon, John
-Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Lin Sent: Tuesday, February 20, 2007 1:09 PM To: beginners@perl.org Subject: Re: Installing modules locally, how to Hi John, > SUN83-PRODWEB>perl Makefile.PL > SUN83-PRODWEB>/usr/ccs/bin/make You have to be root (or use

Re: %Re: installing question

2007-01-09 Thread Jorge Almeida
On Tue, 9 Jan 2007, Mathew wrote: regarding it. I think the Windows comment though was a simply a clever retort to a pointless post. Yes, it was a simple sarcasm. It seems that both the sarcasm and the irony preceeding it were lost on the intended destinatary. Let's forget it. Still, I apolog

Re: %Re: installing question

2007-01-09 Thread Mathew
I don't know anything about Gentoo nor do I care about a debate regarding it. I think the Windows comment though was a simply a clever retort to a pointless post. Mathew David Gama Rodriguez wrote: > Hi all, > > I read this post and I'm concern. > why are you saying gentoo is a bad distributio

Re: Re: extracting common substrings...

2006-12-12 Thread Tom Phoenix
On 12/12/06, D. Bolliger <[EMAIL PROTECTED]> wrote: $found{$1}++ for ($s2=~/($search)/g); # although count not used below Didn't $search just come from the data? It's a string, not a pattern. If it's got any metacharacters, it could break your pattern, or worse. Cheers! --Tom Phoenix S

Re: Re: Checking for infinite loops

2006-12-07 Thread Tom Phoenix
On 12/6/06, hOURS <[EMAIL PROTECTED]> wrote: My program in a nutshell goes: Blah blah blah the beginning part require someprogramthatmayhaveaninfiniteloop.pl Blah blah blah the ending part You must have a good reason for using a buggy library without first fixing its b

Re: Re: Limit of number of files that can be opened in perl

2006-12-02 Thread Jay Savage
Ravi, Please don't top post. On 12/2/06, Ravi Malghan <[EMAIL PROTECTED]> wrote: Hi all: thanks for the responses. I should have done this in the beginning. I checked the status open returns. I try to open 388 files, but it returned true(1) only 249 times (for the first 249 opens). So I gues

Re: Re: commit

2006-11-24 Thread Jay Savage
On 11/21/06, Jenda Krynicky <[EMAIL PROTECTED]> wrote: From: "Jay Savage" <[EMAIL PROTECTED]> > > That's not quite how it works. Transactions and table locking are two > different things. Using transactions won't prevent someone else from > updating the database or getting a read or write lock. I

Re: RE: How to manipulate environment variables in parent process?

2006-11-15 Thread Tom Phoenix
On 11/14/06, siegfried <[EMAIL PROTECTED]> wrote: Yeah: that is precisely the problem. The child inherits from the parent. Can I make the child manipulate the environment table in the parent? I don't think so. Please tell me I'm wrong. No program wants its data changed without its knowledge an

Re: Re: Trying to understand this forking open stuff...

2006-11-08 Thread Jay Savage
On 11/8/06, Jen Spinney <[EMAIL PROTECTED]> wrote: Thanks Jay and Tom! I added this little bit to my script: select (CHILD); $| = 1; select (STDOUT); and it worked just as I expected it to. It's interesting, though, that I've been working with sockets a bunch through IO::Socket and my print

Re: Re: Unable to compile Perl code

2006-11-03 Thread Tom Phoenix
On 11/3/06, Kumar, David - IT Department <[EMAIL PROTECTED]> wrote: Can't locate locale.pm in @INC (@INC contains: Your perl is mis-configured or mis-installed. Redo the installation, make sure that all tests pass, and you'll be back on track. Cheers! --Tom Phoenix Stonehenge Perl Training

Re: Re: All of "perldoc" to text @ 1162502881

2006-11-02 Thread Johan Meskens CS3 jmcs3
Intrah onat Diria .. Thu, 2 Nov 2006 22:07:49 +0100 , Tommy Nordgren wrote "Revera y": > Content-Type: application/octet-stream; > > > > , the following is an abbreviation of the contents: >

Re: Re: All of "perldoc" to text

2006-11-02 Thread Tom Phoenix
On 11/2/06, Bryan R Harris <[EMAIL PROTECTED]> wrote: is there a way to get perldoc to dump *everything* it knows into a huge text file? In addition to the core Perl documentation, which is a large set of pod files, nearly all modules have their own documentation files (usually with .pod or .p

Re: Re: Can't access search.cpan.org

2006-10-29 Thread Jay Savage
On 10/28/06, C. R. <[EMAIL PROTECTED]> wrote: In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > Hi, > > As of 3:43:18 pm here in Manila, Philippines, I can't access search.cpan.org.. Any idea why? > Either a computer between you and CPAN is down temporarily, or very busy, or perhaps y

Re: Re: Opening .dat file in perl

2006-10-24 Thread Tom Phoenix
On 10/24/06, Goksie <[EMAIL PROTECTED]> wrote: Tommy Nordgren wrote: > This might occur because you are trying to print the file handle > instead of reading FROM it. print $fh; Yep, Tommy Nordgren nailed it. If you want to read binary data from a filehandle, you probably want to st

Re: Re: unique hash keys

2006-10-23 Thread Romeo Theriault
On 10/23/06, Adriano Ferreira <[EMAIL PROTECTED]> wrote: On 10/23/06, Romeo Theriault <[EMAIL PROTECTED]> wrote: > Thank you Adriano, that works nicely after I added: > > use Memoize::AnyDBM_File; > > before that I was getting this error: > > AnyDBM_File doesn't define an EXISTS method at I

  1   2   3   4   5   >