> "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
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();
#-
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();
> #--
>
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
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
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 '
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 {
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
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
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
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, 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
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
13 matches
Mail list logo