Why using use strict;Hi all,
I know why I should use "use strict;" but what happen if I use "use
strict;" then if the code is OK, I delete this line?
Shouldn't it work the same without this line if the code has no problems?
Thanks.
Teddy,
orasnita@home.ro
why would you want to do that Octavian?
"use strict" is a sanity safety net. What your saying is like "I know why I
should use safety belt whilst driving my car but what if I took it off?" -
of course you can do it but beware of the consequences.
joel
-----Original Message-----
From: ...
why to use 1)use CGI,2)use Strict ,3)use Carp in script
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 protection around
http://mail.yahoo.com
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...
Using Using
I have just completed reading a chapter in my book on performance. The books says to speed up performance on your web site you should use the using statement when opening connections. My question is how do you catch errors if you are using this as apposed to a try catch block.thanksBryan
Why would you use it as an alternative to a try/catch statement. Couldn't you just do something like public void UsingSomeMethod() { try { SomeMethod(); } catch(SomeException e) { /// do something useful }}public void SomeMethod() { using (Something) { ...
When to use ( and when to use ((?I'm just not getting it.
When do you use ( in a statement, when do you need to use ((, and is
the space after either or both mandatory?
For example, I coded this statement:
if (( $_ eq $bad_guys_ip )) { more_stuff_here };
Why the two (( in an if? And why does it seem to not work when I miss
the space after the ((?
Thanx!
Mark me as...
/Corn-fused|Dense/
> I'm just not getting it.
>=20
> When do you use ( in a statement, when do you need to use ((, and is
> the space after either or both mandatory?
>=20
> For example, I coded this sta...
PROBLEM WITH THE USES OF USE STRICTHello Team,
Can someone please tell me why the below code does not work correctly?
Here is the problem: Once I run the program and type in a couple of wrong
answers and then type in the correct answer I still get the wrong response
(e.g "No that is wrong! Try again.") But if I type in the correct answer
first I get the correct response.
I also should add that if I don't use "use strict" and rename my variable
without "my". The code then works as it should.
regards,
Jaimee
#!/usr/bin/perl -w
use strict;
print (&q...
How to use the arguments to use() in the package being usedHowdy,=20
The subject says it all believe it or not :)
What I'm trying to figure out is how to pass an argument=20
(pragma I believe is the proper term) to use() and do=20
sonethign in the package based on it.
I've looked at CGI.pm source but can't seem to track it down.=20
(Similar idea as to CGIs -oldstyle_urls -newstyel_urls)
http://search.cpan.org/~lds/CGI.pm-3.04/CGI.pm#PRAGMAS
What I'd like to do is something like this:
# for old time's sake we'll just use our favorite module
use Foo::Monkey qw(:Foo :Bar -doamazingthings);
#then in Foo::Monkey...
Loading and using modules using evalHi all,
I have this piece of code:
my @modules = (
'Module1', 'Module2', 'Module3',
'ModuleX', 'ModuleY', 'Blah',
);
my $param1 = "whatever";
my $param2 = 0;
for my $module (@modules) {
$param2++;
eval("require $module");
if ($@) {
print "$module Not found\n";
} else {
eval("&${module}::process('$param1', '$param2')");
}
}
And it's working, but I wonder if there's any cleaner/better way to do this.
The main idea is to have a XML file li...
use Getopt::Std; and use strict;Hi everyone,
I have a problem using Getopt::Std. I depend on use strict for all my
code, and when I use Getopt::Std all the variables it creates (to
hold the command line option values) are flagged by strict because
they have not been scoped. I get errors like this:
Line 70: Global symbol "$opt_m" requires explicit package name
If I don't use strict the program runs fine. Is there anything I can
do about this? Does anyone use both together?
Thanks for the help.
-Hans
Yes you can say
our $opt_m;
or
use vars qw($opt_m);
at the top of your progra...
Pragmas use strict and use warnings------=_Part_1657_33307736.1193755179713
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
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
------=_Part_1657_33307736.1193755179713--
On 10/30/07, Kaushal Shriyan <kaushalshriyan@gmail.com> wrote:
snip
> Whats the exact purpose of use strict
snip
The strict pragma has three effects (unless modified by arguments):
1. most var...
RE: Why do we even HAVE to... (was: Why using use strict;)because it would reek havoc on all the perl one liners.
And deter many beginners that are touching perl for the first time.
And would annoy those who have to write a quick 5 line script in 3 seconds
that forget a my for $line.
> -----Original Message-----
> From: Jake [mailto:jwebster@olemiss.edu]
> Sent: Wednesday, June 05, 2002 8:56 AM
> To: beginners-cgi@perl.org
> Subject: Why do we even HAVE to... (was: Why using use strict;)
>
>
> So, in post after post after post I see the comment "always
> use strict"...
>
> I have seen thr...
How can I use the RichTextBox control used in the Text/HTML module in my custom Module
Hi,I am New to DotNetNuke and want to create my own Cutom Module and include RichTextBox control used in the Text/HTMLDoes anyone know how I can do this.I was hoping that is was one of the controls of DotNetNuke but I cannot find it anywhere.Many ThanksHenry
HTML-Editor is determined by the HTMLEditorProvider.
Have a look into the source code of the Text/HTML, to be found at \desktopModules\HTML\EditHTML.ascx and ~.vb. In Version 3.1 you need to unzip HTML.resources to get the source code files.Sebastian Leupoldgamma concept mbHDeutschNetNuke = DotNetNuke in GermanDNN Project Us...
Why CSK did not use datagrid in Modules? Can it use?
I want to add a Module but I found it....
Thread::UseAnother one in the category "dirty, but maybe useful".
Hope this will make lean (memory wise) threaded programming a little easier.
Again, comments are welcome... ;-)
Liz
=====================================================================
The uploaded file
Thread-Use-0.01.tar.gz
has entered CPAN as
file: $CPAN/authors/id/E/EL/ELIZABETH/Thread-Use-0.01.tar.gz
size: 2972 bytes
md5: 8179f44ff8a2ed31b8052d84cb250369
=head1 NAME
Thread::Use - use a module inside a thread only
=head1 SYNOPSIS
use Thread::Use;
threads->ne...
To use signatures or not to use?--001a11c3871a8a8fe2051b7b8b18
Content-Type: text/plain; charset=UTF-8
Dear all,
Perl now has subroutine signatures. However, they are marked as
experimental feature.
As I really like it, I'm always tempted to use it.
On the other hand, I don't want to wast efforts to something I have to roll
back.
So, does anyone know the tendency if signatures are going to stay?
I'm not looking for the standard "do if you want to do it because
TIMTOWTDI" answer, it will not help me. I'm looking for rumors, or
eventually an assessment from the people who did the fe...