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

2006-03-18 Thread Randal L. Schwartz
> "Xavier" == Xavier Noria <[EMAIL PROTECTED]> writes: Xavier> Currently Perl has no lexical constants, the idioms to accomplish what you Xavier> want are this one Xavier> { Xavier> my $fake_constant = 50; Xavier> sub my_syb { Xavier> # closure, uses $fake_c

Re: 'use strict' problem with command line argument?

2006-03-18 Thread Mr. Shawn H. Corey
Jeff Pang wrote: Hello,John, As you said, BEGIN blocks are compiled and run first before any code in main and they have lexical scope because of the {} brackets. and in his case: #!/usr/bin/perl -w use strict; print "b in main: $b"; a(); #-

Re: 'use strict' problem with command line argument?

2006-03-18 Thread Jeff Pang
Hello,John, As you said, BEGIN blocks are compiled and run first before any code in main and they have lexical scope because of the {} brackets. and in his case: > > #!/usr/bin/perl -w > use strict; > print "b in main: $b"; > a(); > #-- >

Re: 'use strict' problem with command line argument?

2006-03-18 Thread John W. Krahn
tom arnall wrote: > this works: BEGIN blocks are compiled and run first before any code in main and they have lexical scope because of the {} brackets. > #!/usr/bin/perl -w > use strict; > print "b in main: $b"; The variables $a and $b are special in perl which means that they

Re: 'use strict' problem with command line argument?

2006-03-18 Thread Mr. Shawn H. Corey
tom arnall wrote: Global symbol "$fn" requires explicit package name at ./v line 3 where line 3 is: my $b = `cat $fn`; is it the case that using a variable as a container for a command line argument, creates a problem for 'use strict'? No, it's because you didn't tell th

Re: 'use strict' problem with command line argument?

2006-03-18 Thread Xavier Noria
On Mar 18, 2006, at 23:58, tom arnall wrote: getting: Global symbol "$fn" requires explicit package name at ./v line 3 where line 3 is: my $b = `cat $fn`; is it the case that using a variable as a container for a command line argument, creates a problem for '

'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: under 'use strict', how do you assign a value to a constant used only in a subroutine?

2006-03-18 Thread Xavier Noria
On Mar 18, 2006, at 20:01, tom arnall wrote: 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 ch

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

2006-03-18 Thread Mr. Shawn H. Corey
tom arnall wrote: 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 scrip

Matrix Processing for fix set of records with a set number of columns

2006-03-18 Thread Wagner, David --- Senior Programmer Analyst --- WGO
I am assisting a business partner in coming up with a set of min/max values. There are 233 records with 150+ columns in each. The first set was compare column 0 to 1 and report the header of which was lowest. Then repeat using 0 to 2, then 0 to 3, etc.Each process went down the rows

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

2006-03-18 Thread Tom Phoenix
On 3/18/06, tom arnall <[EMAIL PROTECTED]> wrote: > 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 nev

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. thanks, tom ar

rss read issue with non-encoded char

2006-03-18 Thread Joel CARNAT
Hi, I have written a small perl script that reads a few RSS flows and generate an HTML file. It seems one of them have non-ASCII character not encoded ; this make the script stop. *** perl script says *** not well-formed (invalid token) at line 90, column 63, byte 3936 at /usr/pkg/lib/perl5/vend