Quoting from Programming Perl book:
*use v5.14;*
This particular declaration turns on several pragmas including "use
strict"; it also enables new features like the *say* verb, which (unlike
print) adds a newline for you. The implicit strictures feature was added in
v5.12.
On Tue, A
version 3 (v5.12.3) built for
> darwin-thread-multi-2level
> (with 2 registered patches, see perl -V for more detail)
My curiosity had been stimulated & I came up with the below
before I logged on to email it & read your reply.
(I use Cygwin Perl 5.14.0)
#!/usr/bin/perl
$var = "
it & read your reply.
(I use Cygwin Perl 5.14.0)
#!/usr/bin/perl
$var = "A_Value"; # No error produced.
#!/usr/bin/perl
use strict;
$var = "A_Value"
# Output
# Global symbol "$var" requires explicit package name at ./t line 4.
# Execution of ./t aborted due
On Aug 6, 2013, at 12:09 AM, Peter Gordon wrote:
> I'm confused by this documentation.
> http://perldoc.perl.org/functions/use.html
> Does it mean that:
> use 5.12.0;
> automatically turns on "use strict;" ?
It's pretty easy to find out:
50% echo '$x =
On Aug 6, 2013, at 7:09 AM, Peter Gordon wrote:
> I'm confused by this documentation.
> http://perldoc.perl.org/functions/use.html
> Does it mean that:
> use 5.12.0;
> automatically turns on "use strict;" ?
That's the way I read this
use VERSION also en
tions/use.html
Does it mean that:
use 5.12.0;
automatically turns on "use strict;" ?
--
Peter Gordon, pete...@netspace.net.au on 08/06/2013
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
Nice article from the "Perl Maven"
http://perlmaven.com/strict
From the really useful newsletter
http://perlmaven.com/perl-maven-newsletter
a
Andy Bach
(608) 658-1890
Not at my desk
2011/7/14 Shlomi Fish
> Hi Marc,
>
> On Thu, 14 Jul 2011 07:18:55 -0700
> Marc wrote:
>
> > >> #!/usr/bin/perl
> > >> use Text::CSV;
> > >> use DBI;
> > >> use Data::Dumper;
> > >
> > > There is no "use stric
Hi Marc,
On Thu, 14 Jul 2011 07:18:55 -0700
Marc wrote:
> >> #!/usr/bin/perl
> >> use Text::CSV;
> >> use DBI;
> >> use Data::Dumper;
> >
> > There is no "use strict;" and "use warnings;" at the beginning of the file:
>
On 11-07-14 10:18 AM, Marc wrote:
If these pragmas are as important as they are, why is it that they aren't turned on in Perl by
default? How about if we make them the default settings in 5.16 and then add "use
nostrict;" and "use nowarnings;" for when someone wants to turn them off?
For bac
>> #!/usr/bin/perl
>> use Text::CSV;
>> use DBI;
>> use Data::Dumper;
>
> There is no "use strict;" and "use warnings;" at the beginning of the file:
I see this quite a bit on this list (and elsewhere) and I think it's
very go
> "PR" == Phil Regulski writes:
PR> That took care of it. Didn't realize it was a sub in the module. Thanks!
regardless of it being a sub, it was in a place that expected a normal
value and not a bareword. you can use classnames as barewords in certain
places (use, method calls, etc.) but
That took care of it. Didn't realize it was a sub in the module. Thanks!
Shawn H Corey wrote:
Phil Regulski wrote:
Error:
"Bareword "NetCDF::READ" not allowed while "strict subs" in use..."
What is NetCDF::READ, a subroutine?
my $ncid =
NetCDF::open("${netcdfDir}/REORDER.KATX_
Phil Regulski wrote:
> Error:
> "Bareword "NetCDF::READ" not allowed while "strict subs" in use..."
>
What is NetCDF::READ, a subroutine?
> my $ncid =
> NetCDF::open("${netcdfDir}/REORDER.KATX_20091104_1651.CEDRIC.Z1.BIN.nc",NetCDF::READ);
If it's a sub, try:
my $ncid =
NetCDF::open("${netcdf
##########
#!/usr/local/bin/perl
# Programming conventions
use strict;
use warnings;
# Modules
use NetCDF;
# Local require files
require "/usr/local/wx/include_files/date-lib.pl";
# Setting directories
my $ownerDir = "/home/disk/dagny/regulski";
my $mainD
Shit!!
Thanks,
How asinine of me.
From: Алексеев Александр
To: Soham Das
Cc: beginners@perl.org
Sent: Tuesday, 29 September, 2009 2:52:26 PM
Subject: Re: Use Strict, Perl 5.10 and Global Symbol requires explicit package
name
@dates and %dates are two
@dates and %dates are two different variables in Perl. An error occurs,
becouse %dates is not declared.
--
Alexandr A Alexeev
http://web20.su/
Soham Das пишет:
Take a look at the following snippet of code:
#!/usr/bin/perl
use warnings;
use strict;
use Tie::Handle::CSV;
#Read Market Data
my
Take a look at the following snippet of code:
#!/usr/bin/perl
use warnings;
use strict;
use Tie::Handle::CSV;
#Read Market Data
my $file1= shift @ARGV;
my $file2= shift @ARGV;
my $master_fh=Tie::Handle::CSV->new($file1,header=>1);
my $transact_fh=Tie::Handle::CSV->new($file2,header=&
- Original Message
From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
To: beginners@perl.org
Sent: Friday, March 14, 2008 5:14:40 AM
Subject: how to search manual for "use strict"
Hi,
I want to read the installed perl manual on "use strict", so how d
On 3/13/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Hi,
> I want to read the installed perl manual on "use strict", so how do I search
> the perl manual for "use strict"
Does "perldoc strict" not work for you?
--
Mark
--
To unsubscr
Hi,
I want to read the installed perl manual on "use strict", so how do I search
the perl manual for "use strict"
Thanks
L PROTECTED]> wrote:
> > > > snip> Whats the exact purpose of use strict
> >
> > > > snip
> >
> > > > The strict pragma has three effects (unless modified by
> > > > arguments): 1. most variables must be declared (there are some
>
On Oct 30, 5:24 pm, [EMAIL PROTECTED] (Jenda Krynicky) wrote:
> On 30 Oct 2007 at 10:22, Paul Lalli wrote:
>
>
>
>
>
> > On Oct 30, 11:15 am, [EMAIL PROTECTED] (Chas. Owens) wrote:
> > > On 10/30/07, Kaushal Shriyan <[EMAIL PROTECTED]> wrote:
> >
On Oct 30, 2:23 pm, [EMAIL PROTECTED] (Kevin Viel) wrote:
> > -Original Message-
> > From: Paul Lalli [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, October 30, 2007 12:23 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: Pragmas use strict and use warnings
&g
On Oct 30, 9:24 pm, [EMAIL PROTECTED] (Jenda Krynicky) wrote:
> On 30 Oct 2007 at 10:22, Paul Lalli wrote:
>
>
>
> > On Oct 30, 11:15 am, [EMAIL PROTECTED] (Chas. Owens) wrote:
> > > On 10/30/07, Kaushal Shriyan <[EMAIL PROTECTED]> wrote:
> > > s
> -Original Message-
> From: Paul Lalli [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, October 30, 2007 12:23 PM
> To: beginners@perl.org
> Subject: Re: Pragmas use strict and use warnings
> ...no lexical with that name...
^^^
> ...to declare a
On 30 Oct 2007 at 10:22, Paul Lalli wrote:
> On Oct 30, 11:15 am, [EMAIL PROTECTED] (Chas. Owens) wrote:
> > On 10/30/07, Kaushal Shriyan <[EMAIL PROTECTED]> wrote:
> > snip> Whats the exact purpose of use strict
> >
> > snip
> >
> > The str
On Oct 30, 11:15 am, [EMAIL PROTECTED] (Chas. Owens) wrote:
> On 10/30/07, Kaushal Shriyan <[EMAIL PROTECTED]> wrote:
> snip> Whats the exact purpose of use strict
>
> snip
>
> The strict pragma has three effects (unless modified by arguments):
> 1. most variables mu
On 10/30/07, Kaushal Shriyan <[EMAIL PROTECTED]> wrote:
snip
> Whats the exact purpose of use strict
snip
The strict pragma has three effects (unless modified by arguments):
1. most variables must be declared (there are some exceptions)
2. only real references are allowed (symbolic r
Hi
Whats the exact purpose of use strict and use warnings Pragmas in the Perl
Programming Language.
I know use warnings turns on all useful warnings.
Thanks and Regards
Kaushal
On 3/29/07, Sarthak Patnaik <[EMAIL PROTECTED]> wrote:
snip
Is there any workaround for this, so that I can use strict and -s together.
snip
Short answer: yes, the vars pragma
#!/usr/bin/perl -ws
use strict;
use vars qw($k);
print "$k\n"
Long answer: It is however a bad id
rom: Sarthak Patnaik [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 29, 2007 12:05 PM
To: beginners@perl.org
Subject: perl -s and use strict
Hello,
I have a small script:
#!/usr/bin/perl -ws
use strict;
print $k;
As I am using "use strict;", it is giving the following message:
>
>
>
>#!/usr/bin/perl -ws
>
>use strict;
>
>print $k;
>
>
>
>As I am using "use strict;", it is giving the following message:
>
>Variable "$k" is not imported at ./test.pl line 3.
>
This is because you didn't declare t
Hello,
I have a small script:
#!/usr/bin/perl -ws
use strict;
print $k;
As I am using "use strict;", it is giving the following message:
Variable "$k" is not imported at ./test.pl line 3.
Global symbol "$k" requires explicit package name at .
Raphael Brunner wrote:
>
> On Mon, Oct 16, 2006 at 07:36:13PM +0800, Jeff Pang wrote:
>>
>> Raphael Brunner wrote:
>>>
>>> eg:
>>>
>>> use strict;
>>> my $var = 20;
>>>
>>> print "$var\n";
>>> &
>eg:
>
>use strict;
>my $var = 20;
>
>print "before: $var\n";
>&routine;
>print "after: $var\n";
>exit;
>
>
>sub routine {
> $var += 1;
>> >}
>
Hi,you don't need the global vars at all.The same way,you can w
* Raphael Brunner <[EMAIL PROTECTED]> [2006-10-16T08:38:00]
> But, my problem is, i must see this variable after the call of the sub.
> I'm sorry for the first example, it was inaccurate. But this is ok (I
> think) :) (because I have a lot of variables, which I must change in the
> sub, I want to d
nside my parent-routine (in the
example: the programm, but by me: the parent-sub)).
Thanks for all, Raphael
eg:
use strict;
my $var = 20;
print "before: $var\n";
&routine;
print "after: $var\n";
exit;
sub routine {
$var += 1;
> >}
On Mon, Oct 16, 2006 at 07
--- Jeff Pang <[EMAIL PROTECTED]> wrote:
> Hi,you can do it by passing the vars to the subroutine like:
>
> my $var = 20;
> &routine($var);
>
> sub routine {
> my $var = shift;
> print $var;
> }
>
I'll second this recommendation because it makes the subroutines more
flexible (what if th
>
>eg:
>
>use strict;
>my $var = 20;
>
>print "$var\n";
>&routine;
>exit;
>
>
>sub routine {
> print "$var\n";
>}
>
Hi,you can do it by passing the vars to the subroutine like:
my $var = 20;
&routine($var);
sub ro
Dear Users
is there a possibility to use "use strict" and to define variables in
the programm, which are also seen in the subroutines called from this
block? I want the same value in the var in the subroutine like before,
but without it to define as global. What could I do?
Thanks for
--- Original Message ---
> Ted Fines wrote:
> > Hi,
>
> Hello,
>
> > I'm running into a Cach-22 with 'use strict', and filehandles.
> >
> > I have a program which opens two log files at the beginning:
> > open(INFLOG,">>$info
Ted Fines wrote:
> Hi,
Hello,
> I'm running into a Cach-22 with 'use strict', and filehandles.
>
> I have a program which opens two log files at the beginning:
> open(INFLOG,">>$info_log") || die "Could not append to $info_log_file.
> Qui
lto:[EMAIL PROTECTED]
Sent: Thursday, August 31, 2006 12:17 PM
To: beginners@perl.org
Subject: 'use strict' and filehandles
Hi,
I'm running into a Cach-22 with 'use strict', and filehandles.
I have a program which opens two log files at the beginning:
open(INFLOG,"&
Hi,
I'm running into a Cach-22 with 'use strict', and filehandles.
I have a program which opens two log files at the beginning:
open(INFLOG,">>$info_log") || die "Could not append to $info_log_file.
Quitting.\n";
open(ERRLOG,">>$err
> "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";
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 mai
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
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'
roblem for 'use strict'?
I don't understand how the question relates to the trials. To know
the answer you just write:
use strict;
my $fn = shift;
my $b = `cat $fn`;
Why those convoluted BEGINs with ours() and friends?
-- fxn
--
To unsubscribe, e-mail: [EMAIL
this works:
#!/usr/bin/perl -w
use strict;
print "b in main: $b";
a();
#--
BEGIN{
our ($b);
my ($fn) = @ARGV;
$b = `cat $fn`;
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
varia
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
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 cons
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
When you 'use strict', you must declare each variable using my().
my referrers = qw(one two three four);
When you do this, be sure to keep in mind that whatever variable you
declare will be scoped to the block it is in (or the file, if it is
declared outside of a block.
Do
p... trying to this thing right..
> with all these errors one might assume it's simply - forgot to do
> something...
>
> any help in the solution to these errors is greatly appreciated
>
> "use strict;" is used..
>
> # perl
Need a little help... trying to this thing right..
with all these errors one might assume it's simply - forgot to do
something...
any help in the solution to these errors is greatly appreciated
"use strict;" is used..
# perl -c theta.pl >
Variab
On Sun, 02 Oct 2005 21:08:48 +0200, Gerard Robin wrote:
> I pick up this example in a tutorial (it is old but it exists and there are
> many examples
> and most of them are understandable (imho)) because I searched some example
> of scripts
> which used local. I encounter some problems to figure
On Sun, Oct 02, 2005 at 08:49:30AM -0400 Jeff 'japhy' Pinyan wrote:
...
>
> If you REALLY want to use package variables instead of lexicals, then you
> need to follow the instructions in the 'strict' documentation for
> declaring your global varia
On Oct 2, Gerard Robin said:
use warnings;
# use strict;
$foo = 26;
@foo = ("here's", "a", "list");
&testsub (*foo);
print ("The value of \$foo is now $foo\n");
sub testsub {
local (*printarray) = @_;
foreach $element ( @printarray) {
prin
Hello,
when I try this example for aliases:
use warnings;
# use strict;
$foo = 26;
@foo = ("here's", "a", "list");
&testsub (*foo);
print ("The value of \$foo is now $foo\n");
sub testsub {
local (*printarray) = @_;
foreach $element ( @printa
Ken Killer wrote:
> I load the config file in the main program using do,
>
> #!perl
> do "conf";
> use strict;
> print "value of v is $v\n";
>
> and the config file has only one line,
>
> $v = 'hello
before $v, but I got same error as before.
On 7/5/05, Chris Devers <[EMAIL PROTECTED]> wrote:
On Mon, 4 Jul 2005, Ken Killer wrote:
I load the config file in the main program using do,
#!perl
do "conf";
use strict;
print "value of v is $v\n";
---
I tried to add 'my' before $v, but I got same error as before.
On 7/5/05, Chris Devers <[EMAIL PROTECTED]> wrote:
> On Mon, 4 Jul 2005, Ken Killer wrote:
>
> > I load the config file in the main program using do,
> >
> > #!perl
> > do "c
On Mon, 4 Jul 2005, Ken Killer wrote:
> I load the config file in the main program using do,
>
> #!perl
> do "conf";
> use strict;
> print "value of v is $v\n";
>
> and the config file has only one line,
>
>
I load the config file in the main program using do,
#!perl
do "conf";
use strict;
print "value of v is $v\n";
and the config file has only one line,
$v = 'hello';
when I run the main.pl, it reports following error, how to
I typically do:
#!/usr/bin/perl
#pragmas
use strict;
use warnings;
#modules
use Tk;
And so on...I just think it organizes better.
Robert
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.
On Wed, 23 Mar 2005, Roberts Mr Richard L wrote:
> My superior and I are debating where 'use strict/warnings' should be
> placed: prior to any use module statement or after? Anyone?
It doesn't really matter a whole lot if the modules are well behaved.
But then, that
Roberts Mr Richard L wrote:
My superior and I are debating where 'use strict/warnings' should be placed:
prior to any use module statement or after?
Anyone?
Please start a new thread, snip old messages that are not related.
Generally it doesn't matter since they are both file scoped
My superior and I are debating where 'use strict/warnings' should be placed:
prior to any use module statement or after?
Anyone?
-Original Message-
From: Atul Vohra [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 23, 2005 1:44 PM
To: Felix Geerinckx; beginners@perl.org
Subjec
On Thu, 2004-11-04 at 09:31, supriya devburman wrote:
> hi
Hi
> why we r using
> 1)use CGI,
We only use CGI when we want to use methods from that module (usually on
web pages); see `perldoc CGI` for more information on what you can do
with it.
> 2)use Strict,
The correct name is
On Thu, 4 Nov 2004, supriya devburman wrote:
> [W]hy [are we] using
>
> 1)use CGI,
> 2)use Strict,
> 3)use Carp
>
> in the begining of script sometimes[question mark] What is the use of
> [them][question mark] [Are] the files CGI.pm, Strict.pm, [and] Carp.pm
> defaul
hi
why we r using
1)use CGI,
2)use Strict,
3)use Carp
in the begining of script sometimes. What is the use
of it.Is the files CGI.pm,Strict.pm,Carp.pm default
with PERL.
Thnx
__
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam
Oh no, what a simple mistake. :)
I thank you so much!
Best regards
Luis
Jeff 'Japhy' Pinyan schrieb:
On Jul 7, Luis said:
"Can't use string ("1") as a HASH ref while "strict refs" in use at
TestObject.pm line 21."
sub insertFriends {
my $self = @_;
The problem is that $self is not what y
On Jul 7, Luis said:
>"Can't use string ("1") as a HASH ref while "strict refs" in use at
>TestObject.pm line 21."
> sub insertFriends {
> my $self = @_;
The problem is that $self is not what you think it is. You have stored
the number of elements in @_ into $self. You meant
my ($sel
explain the problem with the hash.
Thanks in advance
Luis
Luis schrieb:
Hi,
I have a problem. The following code results a
"Can't use string ("1") as a HASH ref while "strict refs" in use at
TestObject.pm line 21."
Error if I include the "use strict&quo
Hi,
I have a problem. The following code results a
"Can't use string ("1") as a HASH ref while "strict refs" in use at
TestObject.pm line 21."
Error if I include the "use strict" command. I don't understand why this
error occures.
name);
>
> I have a "use UserList" line near the top of this file. I also have
> "use strict" and "use warnings".
>
> I would have expected Perl to complain about the bareword "UserList" in
> the second line, or find some other way to compl
Greetings!
I found the source of the "impossible error". Here are the lines that
caused it:
my $userList = new UserList($userFile);
my $user = UserList->GetUser($logname);
I have a "use UserList" line near the top of this file. I also have
"use stri
MCMULLIN, NANCY wrote on 14.05.2004:
>But when I run the same code with use strict commented out - it
>works just fine...
A little late maybe, but CGI::Carp might be something for you. Its method
fatalsToBrowser sends Perl's error messages to your browser window.
HTH,
Jan
--
T
Hi,
When I include the line
use strict;
in any perl program, I get the following error:
"Internal Server Error
What does occur when you run the file manually?
perl -T $filename
Perhaps that gives a possible error definition,
Personally i tend to use ;
use diagnostics;
use warnings;
use s
Okay - got it. It now works prefacing $str = .. with my.
Thanks everyone.
-Original Message-
From: Andrew Gaffney [mailto:[EMAIL PROTECTED]
Sent: Friday, May 14, 2004 1:30 PM
To: [EMAIL PROTECTED]
Subject: Re: Problem with use strict;
MCMULLIN, NANCY wrote:
> But when I run the s
MCMULLIN, NANCY wrote:
But when I run the same code with use strict commented out - it works just fine...
'use strict' enforces the use of 'my' or 'our' for variable declarations. If a
variable declaration doesn't have that while 'use strict' is in e
But when I run the same code with use strict commented out - it works just fine...
-Original Message-
From: Bob Showalter [mailto:[EMAIL PROTECTED]
Sent: Friday, May 14, 2004 1:15 PM
To: MCMULLIN, NANCY; [EMAIL PROTECTED]
Subject: RE: Problem with use strict;
MCMULLIN, NANCY wrote
MCMULLIN, NANCY wrote:
> Hi there.
> Brand new to PERL so please bear with me. (I'm running Win32/Apache)
Hi. It's "Perl", not "PERL". You're excused since you're brand new :~)
>
> When I include the line
> use strict;
> in any perl pr
In a message dated 5/14/2004 3:05:01 PM Eastern Daylight Time,
[EMAIL PROTECTED] writes:
>Hi there.
>Brand new to PERL so please bear with me. (I'm running Win32/Apache)
>
>When I include the line
>use strict;
>in any perl program, I get the following error:
>"In
Hi there.
Brand new to PERL so please bear with me. (I'm running Win32/Apache)
When I include the line
use strict;
in any perl program, I get the following error:
"Internal Server Error
The server encountered an internal error or misconfiguration and was unable to
complete yo
In this case, $func holds a "hard reference", not a "soft reference".
The strict pragma only blocks the latter.
Here's a simple example:
sub howdy { print "Howdy!\n"; }
my $func = \&howdy;# hard reference
$func->();# fine, even with strictures
$func = 'howdy';# soft referen
On Mar 20, 2004, at 1:20 PM, JupiterHost.Net wrote:
Howdy List!
I noticed in the source code for the File::Slurp module that it does
'use strict;' and then in sub error {} it calls a function like so :
$func->($err_msg);
I was curious as to how that is possible without using &quo
JupiterHost.Net wrote:
Howdy List!
I noticed in the source code for the File::Slurp module that it does
'use strict;' and then in sub error {} it calls a function like so :
$func->($err_msg);
I was curious as to how that is possible without using "no strict
'subs
Howdy List!
I noticed in the source code for the File::Slurp module that it does
'use strict;' and then in sub error {} it calls a function like so :
$func->($err_msg);
I was curious as to how that is possible without using "no strict
'subs';" or "refs&qu
On 02/23/04 09:42, J Ingersoll wrote:
HI
One local resident perl expert (speaking at a LUG) suggested modifying use
of the strict pragma with vars, as in :
#!/usr/bin/perl -w
use strict vars;
I find however that it's necessary to put 'vars' in quotes to avoid a
warni
HI
One local resident perl expert (speaking at a LUG) suggested modifying use
of the strict pragma with vars, as in :
#!/usr/bin/perl -w
use strict vars;
I find however that it's necessary to put 'vars' in quotes to avoid a
warning message, viz.:
Unquoted string "
Please bottom post.
> 1. You are missing ";"
> Type
> `egrep $name testing.txt`;
> And not
> 'egrep $name testing.txt'
>
> Not the backticks and not quotes ...
>
There's also no reason to use backticks in void context.
perldoc -f system
Please use full paths, error check, etc. if you are goi
Bill Jastram wrote:
>
> When I use the following portion of Perl code:
> __
>
> #!/usr/bin/perl
> # use with:
> # perl IfThenElse tfcfam (Use all of this at the command line!)
>
> use strict;
> use warnings;
>
> pr
1. You are missing ";"
Type
`egrep $name testing.txt`;
And not
'egrep $name testing.txt'
Not the backticks and not quotes ...
HTH,
José.
-Original Message-
From: Bill Jastram [mailto:[EMAIL PROTECTED]
Sent: Friday, January 23, 2004 4:00 PM
To: [EMAIL PROTECTED]
When I use the following portion of Perl code:
__
#!/usr/bin/perl
# use with:
# perl IfThenElse tfcfam (Use all of this at the command line!)
use strict;
use warnings;
print "Search by name: ";
my $name = ;
'egrep $name testing.
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] (B McKee) writes:
>On Tuesday, January 20, 2004, at 10:34 AM, B McKee wrote:
>
>> Hi All,
>> I'm having trouble understanding what use strict is trying to tell me.
>> If I have run this program
>...snippe
1 - 100 of 328 matches
Mail list logo