> -Original Message-
> From: Mohammed Khatib [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, November 28, 2002 3:47 PM
> To: Perl
> Subject: Perl equivelant of C's switch function
>
> Hi Everyone,
>
> I'm looking for a function in Perl that is equivelant to C's "switch"
fu
Hi Everyone,
I'm looking for a function in Perl that is equivelant to C's "switch"
function, where multiple conditionals (sort of like multiple "elsif"
statements, only more compact and neater) can be set out and action taken on
each chosen option.
Does anyone know of such a function in Perl?
Th
I tried to install the new dev kit on win2k.
I am an admin and have tried everything.
I deleted all occurances in the registry, but still will not register the
percom.dll
any ideas??
___
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://
On Wed, Nov 27, 2002 at 04:47:01PM -0700, Wayne Simmons wrote:
> "An our declaration declares a global variable that will be visible across
> its entire lexical scope, even across package boundaries. The package in
> which the variable is entered is determined at the point of the declaration,
> not
Wayne Simmons wrote:
'our' creates package level variables. In the code above, you first
create and assign a value to $main::JobName in Test.pl. Then in
testpack.pm you create the varaible $testpack::JobName which is
initialized to the undefined value. This last variable is the one seen
inside &
> 'our' creates package level variables. In the code above, you first
> create and assign a value to $main::JobName in Test.pl. Then in
> testpack.pm you create the varaible $testpack::JobName which is
> initialized to the undefined value. This last variable is the one seen
> inside &testpack::te
Balvinder writes..
>I have a perl script which excepts command line parameters. I am using
>getopt function to get the parameters and even if I pass all the
>required parameters, the script exits out on the below statement
>
>if (!getopt('U:D:S:F:M:Hh')) {
> die "*** ERROR *** \n $USAGE \n\n";
>}
Wayne Simmons wrote:
Is the keyword "our" treated differently for modules?
Ex:
Test.pl:
#!/Perl/bin/perl
use testpack;
our $JobName = 'foo';
testpack::testfunc(); #line A
exit 0;
testpack.pm:
package testpack;
sub testfunc;
our $JobName;
sub testfunc
{
my $x = 1; #at this point $JobName is und
Wayne Simmons wrote:
Is the keyword "our" treated differently for modules?
Ex:
Test.pl:
#!/Perl/bin/perl
use testpack;
our $JobName = 'foo';
testpack::testfunc(); #line A
exit 0;
testpack.pm:
package testpack;
sub testfunc;
our $JobName;
sub testfunc
{
my $x = 1; #at this point $JobName is und
Is the keyword "our" treated differently for modules?
Ex:
Test.pl:
#!/Perl/bin/perl
use testpack;
our $JobName = 'foo';
testpack::testfunc(); #line A
exit 0;
testpack.pm:
package testpack;
sub testfunc;
our $JobName;
sub testfunc
{
my $x = 1; #at this point $JobName is undefined
I have had quite a bit of success with:
require SomeModule;
SomeModule->invoke(...);
Where the above stub is only called if and when needed, one per module.
SomeModule.pm would look like:
package SomeModule;
sub invoke
{
my($class, @args) = @_;
...
}
To remove all commas from a string you could just do:
$string =~ s/,//g;
or
s/,//g; if data in $_
Or do I not understand the problem?
Basil Daoust
Automation Services
Title: Question about split
$string=~s/,//
-Original Message-From: Moreno, Javier (GXS, Softtek)
[mailto:[EMAIL PROTECTED]]Sent: Wednesday, November 27, 2002 2:08
PMTo: Activeperl (E-mail)Subject: Question about
split
Hi all,
I have a question. I found on the
perl documentation (p
I think so,
to replace all "," with null in $_
try s/,//g;
Basil Daoust
"Moreno, Javier \(GXS,
Title: Question about split
Javier,
Simply change the regular expression argument to split from /
*/ to //.
Dirk Bremer - Systems Programmer II - ESS/AMS
- NISC St. Peters636-922-9158 ext. 8652 fax 636-447-4471
[EMAIL PROTECTED]www.nisc.cc
- Original Message -
From:
Moren
I did
not put exactly what you wanted in my example however - you can retrieve the
cookie via $cgi->cookie('name_of_cookie');
Sorry
about that.
-Original Message-From: Michael C. Podlesny
[mailto:[EMAIL PROTECTED]]Sent: Monday, November 25, 2002 4:14
PMTo: [EMAIL PROTECTE
16 matches
Mail list logo