Re: GOODBYE from beginners@perl.org

2010-08-12 Thread tom arnall
eWVYhen0GBqknrx9c= > Received: by 10.151.133.4 with SMTP id k4mr1392600ybn.159.1281676490585; > Thu, 12 Aug 2010 22:14:50 -0700 (PDT) > Return-Path: > Received: from tosh2.localnet (70-6-161-53.pools.spcsdns.net [70.6.161.53]) > by mx.google.com with ESMTPS id > p8sm24302

trying to get unicode to work in perl

2007-08-09 Thread tom arnall
SPLAY=:0.0 COLORTERM=gnome-terminal XAUTHORITY=/tmp/.gdm5HJEWT _=/usr/bin/env [EMAIL PROTECTED]:~$ Thanks in advance, tom arnall -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

is this a rigged test?

2007-12-30 Thread tom arnall
same benchmark for Python and they use a constant. is this for real? the partial-sums code was all i checked. tom arnall arcata -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

is this a rigged test?

2007-12-30 Thread tom arnall
oops. i just ran the code. no diff' when run $TWO_THIRDS. oh well, in Perl subroutines are cheap! -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

under 'use strict', how do you assign a value to a constant used only in a subroutine?

2006-03-18 Thread tom arnall
under 'use strict', how do you assign a value to a constant used only in a subroutine, without doing the assignment with every execution of the sub', and without making the constant a global variable. by constant i mean a variable which never changes value throughout the script

'use strict' problem with command line argument?

2006-03-18 Thread tom arnall
this works: #!/usr/bin/perl -w use strict; print "b in main: $b"; a(); #-- BEGIN{ our ($b); my ($fn) = @ARGV; $b = `cat $fn`; sub a {

Re: substitute all but the last

2006-03-22 Thread tom arnall
Tom, John, could you explain in detail what the stuff in parens is about, i.e., '?=.*\.' ? thanks, tom arnall north spit, ca On Wednesday 22 March 2006 12:41 pm, Tom Phoenix wrote: > On 3/22/06, S.A. Birl <[EMAIL PROTECTED]> wrote: > > Im looking to subtitut

\Q\E fails with '$' ?

2006-03-23 Thread tom arnall
from the debugger: p 1 if /[\Q$\E]/ gets: Unmatched [ in regex; marked by <-- HERE in m/[ <-- HERE E\]/ the following works: p 1 if /[\Q\$\E]/ but shouldn't \Q \E be sufficient to make perl treat '$' as a literal? thanks, tom arnall no

debugger and module code

2006-03-23 Thread tom arnall
is there any way to get the debugger to work on code in module files? thanks, tom arnall north spit, ca -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

ignore question about debugger and modules

2006-03-23 Thread tom arnall
please ignore question about debugger and modules. i was using 'n' instead of 's' to step through the code. thanks, tom arnall north spit, ca -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> &l

Re: newbie sort question

2006-03-23 Thread tom arnall
em by myself, I have something which is easily understandable in a maillist forum If you set up some automation, the process of extracting the problem from the application into a study script is easy. tom arnall north spit, ca On Thursday 23 March 2006 01:13 am, Val Genova

perl -c someScript >someFile

2006-03-23 Thread tom arnall
i want to capture to a file the output of perl's '-c' command-line option, as in: perl -c someScript >someFile perl insists on simply dumping the output to the screen. is there a solution to this? thanks, tom arnall north spit, ca -- To unsubscri

the only difference is the 'x' after '/g'

2006-03-30 Thread tom arnall
main = /From [^\n]*?\n.*?(From: .*?\n).*?/g; print "@main"; produces: From: b From: d -- From: b the only difference between the two regex lines is the 'x' after '/g' in the first of the tw

Re: the only difference is the 'x' after '/g'

2006-03-30 Thread tom arnall
i need the blank in 'From [' etc in order to distinguish it from the strings with 'From:' one solution to the problem, btw, is to use '\s' instead of a literal blank. does this behavior rank as a bug in perl? tom arnall north spit, ca On Thursday 30 March 2006

Re: the only difference is the 'x' after '/g'

2006-03-31 Thread tom arnall
Hans, got it: /x tells sys' to ignore all white space, not just \n. thanks very much. and thanks to the people who make possible this great mailing list. ;o) tom arnall north spit, ca On Friday 31 March 2006 07:29 am, Hans Meier (John Doe) wrote: > tom arnall am Freitag, 31. März 20

a way to avoid recompiling perl?

2006-04-10 Thread tom arnall
Is there any way to run perl - apart from apache and modperl - that avoids having to recompile perl each time it's invoked? Specifically, I have a script that turns a large file into a hash variable each time it is invoked from nedit. Thanks, Tom Arnall north spit, ca -- To unsubscri

why is setlocale not working?

2006-04-11 Thread tom arnall
!!!??? why is 'óvalo' following 'zurrir' after the sort?? i.e., why is the setlocale statement not working? the locale seems to be set up properly on my system (debian linux), i.e., i've got: /usr/share/i18n/locales/es_ES thanks, tom arnall north spit,

Re: ignore first 9 lines...

2006-04-12 Thread tom arnall
!!!??? why is 'óvalo' following 'zurrir' after the sort?? i.e., why is the setlocale statement not working? the locale seems to be set up properly on my system (debian linux), i.e., i've got: /usr/share/i18n/locales/es_ES thanks, tom arnall north spit,

Re: why is setlocale not working?

2006-04-12 Thread tom arnall
thanks. your change makes the sort work. but the result of 'setlocale(LC_COLLATE)' in my code is still 'en_US'. thanks, tom On Wednesday 12 April 2006 12:06 am, John W. Krahn wrote: > tom arnall wrote: > > the following code: > > > > #!/usr/bi

Re: reference to a hash

2006-04-16 Thread tom arnall
o %h; > print "@{[ %h ]}"; > ' > a b c d e f g h i j > A B C D E F G H I J > e f c d a b g h i j > e F c D a B g H i J > far out!!! ;o) tom arnall north spit, ca -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

LWP gives garbage characters

2006-04-20 Thread tom arnall
i am trying to spider a site with LWP but get garbage characters when i do: $result = $ua->get($url,%header); my $page = $res1->content; 'lynx' however gives a clean result. thanks, tom arnall north spit, ca -- To unsubscribe, e-mail: [EMAIL PROTECTED

'Tie::StdScalar' - perl tells me it can't find it

2006-04-29 Thread tom arnall
i'm try to use 'Tie::StdScalar' but perl tells me it can't find it. I've pushed '/usr/share/perl/5.8.7' onto @INC. the error is: Can't locate Tie/StdScalar.pm in @INC in '/usr/share/perl/5.8.7/Tie/Scalar.pm' there is 'p

Re: 'Tie::StdScalar' - perl tells me it can't find it

2006-04-30 Thread tom arnall
On Saturday 29 April 2006 10:43 am, you wrote: > On Sat, 2006-29-04 at 10:28 -0700, tom arnall wrote: > > i'm try to use 'Tie::StdScalar' but perl tells me it can't find it. I've > > pushed '/usr/share/perl/5.8.7' onto @INC. the error is:

Re: 'Tie::StdScalar' - perl tells me it can't find it

2006-04-30 Thread tom arnall
On Saturday 29 April 2006 10:43 am, Mr. Shawn H. Corey wrote: > On Sat, 2006-29-04 at 10:28 -0700, tom arnall wrote: > > i'm try to use 'Tie::StdScalar' but perl tells me it can't find it. I've > > pushed '/usr/share/perl/5.8.7' onto @INC. the e

Re: 'Tie::StdScalar' - perl tells me it can't find it

2006-04-30 Thread tom arnall
On Saturday 29 April 2006 10:43 am, Mr. Shawn H. Corey wrote: > On Sat, 2006-29-04 at 10:28 -0700, tom arnall wrote: > > i'm try to use 'Tie::StdScalar' but perl tells me it can't find it. I've > > pushed '/usr/share/perl/5.8.7' onto @INC. the e

Re: 'Tie::StdScalar' - perl tells me it can't find it

2006-04-30 Thread tom arnall
On Sunday 30 April 2006 05:20 am, D. Bolliger wrote: > tom arnall am Sonntag, 30. April 2006 01.04: > > On Saturday 29 April 2006 10:43 am, Mr. Shawn H. Corey wrote: > > > On Sat, 2006-29-04 at 10:28 -0700, tom arnall wrote: > > > > i'm try to use 'Tie::St

Re: 'Tie::StdScalar' - perl tells me it can't find it

2006-05-03 Thread tom arnall
On Wednesday 03 May 2006 03:29 am, D. Bolliger wrote: > tom arnall am Sonntag, 30. April 2006 22.57: > [...] > > > OK, the above stuff is all good. And now I have another question. The > > following code: > > > > #!/usr/bin/perl -w > > use stric

want regex to produce a scalar which is defined when no match

2006-05-15 Thread tom arnall
and have $g come out a scalar which is defined. thanks, Tom Arnall north spit, ca -- thanks, Tom Arnall north spit, ca -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

regex extraction problem

2006-05-27 Thread tom arnall
first two cells and to produce no undefined cells? thanks, Tom Arnall -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: regex extraction problem

2006-05-28 Thread tom arnall
On Sunday 28 May 2006 12:20 am, John W. Krahn wrote: > tom arnall wrote: > > the following code: > > > > $_='abcd'; > > @f = /(x)(y)|(a)(b)/; > > > > makes the first two cells of '@f' to be undefined, then puts 'a' and

should be a seamless upgrade?

2006-06-22 Thread tom arnall
n continue doing the install/whatever which i originally came to do? 'install Bundle::CPAN' however ties the utility up until the cpan install is done. Tom Arnall north spit, ca -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http:/

'-d' with '>' creates errors

2006-06-22 Thread tom arnall
rl5db.pl line 2203 DB::DB called at ./myscript line 12 Debugged program terminated. Use q to quit or R to restart, use o inhibit_exit to avoid stopping after program termination, h q, h R or h o to get additional info. DB<1> = thanks

'-d' with '>' creates errors

2006-06-23 Thread tom arnall
rl5db.pl line 2203 DB::DB called at ./myscript line 12 Debugged program terminated. Use q to quit or R to restart, use o inhibit_exit to avoid stopping after program termination, h q, h R or h o to get additional info. DB<1> = thanks

should be a seamless upgrade?

2006-06-23 Thread tom arnall
n continue doing the install/whatever which i originally came to do? 'install Bundle::CPAN' however ties the utility up until the cpan install is done. Tom Arnall north spit, ca -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http:/

disappointing '.*?'

2006-06-26 Thread tom arnall
xpression in Line 12? also, why should removal of the 'a|' in $re1 make any difference in the behavior of the expression? in fact, the removal causes the regex to return '[11]', i.e., allows the '?' quantifier to work. Thanks, Tom Arnall -- thanks, tom arnall

puzzling '.{1,4}'

2006-06-26 Thread tom arnall
:$f\n"; produces: f:x11x x22x a f:x x22x a shouldn't the second section produce ''x11x'? (the difference between the two sections is in lines 6/12.) thanks, tom arnall -- To unsubscribe, e-mail: [EMA

Re: puzzling '.{1,4}'

2006-06-26 Thread tom arnall
#find an 'a' /x; $re2 = qr/ ( $re1#find $re1 \s #and whitespace )? #or maybe none of the foregoing

Re: disappointing '.*?'

2006-06-26 Thread tom arnall
inline. On Monday 26 June 2006 12:37 pm, Tom Phoenix wrote: > On 6/26/06, tom arnall <[EMAIL PROTECTED]> wrote: > > 1 #!/usr/bin/perl -w > > 2 > > 3 $_ = " [11] [22] a "; > > 4 > > 5 #with .*? > > 6 $re1 =

Re: disappointing '.*?'

2006-06-26 Thread tom arnall
On Monday 26 June 2006 01:48 pm, Tom Phoenix wrote: > On 6/26/06, tom arnall <[EMAIL PROTECTED]> wrote: > > > > 3 $_ = " [11] [22] a "; > > > > > > > > 6 $re1 = qr/a|\[.*?\d\d\]/; > > > > 7 $re2 = qr/($re1\s)?$

Re: '-d' with '>' creates errors

2006-06-27 Thread tom arnall
inline. Tom Arnall On Thursday 22 June 2006 06:35 pm, Tom Phoenix wrote: > On 6/22/06, tom arnall <[EMAIL PROTECTED]> wrote: > > invoking a perl script with '#!/usr/perl -wd' in its first line and > > with './myscript >t' on the command line, >

Re: puzzling '.{1,4}'

2006-06-27 Thread tom arnall
I guess I expected it to give me something like > g:: > h:x11x : > where the first match was the empty string and the second was the > pattern match. i would have thought the same. i don't u'stand yet why .*? doesn't find a match other than nothing. at any rate, i found a solu

Re: disappointing '.*?'

2006-06-27 Thread tom arnall
On Monday 26 June 2006 12:37 pm, Tom Phoenix wrote: > On 6/26/06, tom arnall <[EMAIL PROTECTED]> wrote: > > 1 #!/usr/bin/perl -w > > 2 > > 3 $_ = " [11] [22] a "; > > 4 > > 5 #with .*? > > 6 $re1 =

new email address

2006-07-01 Thread tom arnall
hi, folks! please note the 'from' email address. it is my new one. tom -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: how to add a list of numbers

2006-07-20 Thread tom arnall
foreach(@number) { $sum += $_; } I think we should use this kind of algorithm in answer to a newbie's question. Or have I, learned colleagues, missed something? Tom Arnall North Spit, CA -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mai

Re: how to add a list of numbers

2006-07-21 Thread tom arnall
On Thursday 20 July 2006 12:27 pm, Charles K. Clarkson wrote: > tom arnall wrote: > : Whatever happened to good old: > : > : my (@data,$result); > > Why declare these ... > > : @number = (1,2,3); > : $sum = 0; > > And then use these? > >

Re: sending output to file

2006-07-28 Thread tom arnall
On Thursday 27 July 2006 05:02 am, Sayed, Irfan (Irfan) wrote: > Hi All, > > I need to send / print / write the output of one command to a file > through perl script > > can anybody plz help. could you give us an example of a command whose output you would like to send to a

fishy conditional expression

2007-01-29 Thread tom arnall
file or directory 2 seems to me both print statements should be skipped. what am i missing? tom arnall north spit, ca "Relax, the tests extend the compiler." -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

how good is 'crypt()'?

2007-02-27 Thread tom arnall
ac' DB<3> p crypt($f,'ab') abBUNZY4cR2mg DB<4> p crypt($g,'ab') abBUNZY4cR2m tom arnall north spit, ca usa -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: sending output to file and terminal

2007-03-29 Thread tom arnall
follow the prompts. of course, this assumes a unix-compatible environment. don't know the drill for windows. tom arnall north spit, ca Make cyberspace pretty: stamp out curly brackets and semicolons. Relax - the tests extend the compiler. -- To unsubscribe, e-mail: [EMAIL PROTECTED]

i say literal; perl says metacharacter

2006-03-10 Thread tom arnall
of $f as a literal? or is there another way entirely to accomplish the same goal? thanks, tom arnall north spit, ca -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>