Is it the if ($MGMTCMNT =~ /$MGMTNM/) part that is tripping you up? I
believe you could change it to if ($MGMTCMNT =~ /\Q$MGMTNM\E/) if you
need to keep the regular expression. Another idea might be to change it
to
if ( ($start = index($MGMTCMNT, $MGMTNM ()) 0) {
-Original Message-
I want to be able to return a true or false value from a function in a
module and populate the $! variable with the specific errors. Is this
possible? Is there documentation on how to do this? I can find docs on how
to use $! but not how to set it. Thanks for any help
-Ken
I would like to write a function that will get all the global variables that
are declared in my script plus their values( which will all be strings if
that matters). This is what I have so far:
my ( $varName, $globValue );
while ( ($varName, $globValue) = each %main:: )
{
print \$$varName
Is there an easy way to go back and forth between decimal and hex in perl.
I know of the hex function which solves my hex to dec problem but how about
a dec-hex function or module? I need the value which is why printf isn't
working for me.
Thanks for any help.
-Ken
One issue I ran into was using Here document without single quotes
print EOJS
and perl was trying to interpret things in my javascript.
Saying print 'EOJS'
fixed it, perl trying to interpret things may also be the problem if you are
using print statements.
-Ken
-Original Message-
looks like you tried to call the sub before you defined it, try putting a
definition just below all the use statements or just move the whole sub up
there
-Ken
-Original Message-
From: Christopher G Tantalo [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 02, 2003 3:43 PM
To: [EMAIL
Is it possible to open/create a file with open that does not exist and give
it a umask that makes it executable, say for the purpose of generating shell
scripts?
For example, say
open OUT_FILE, MAGIC_UMASK, /scripts/new_script;
where the current umask is 2.
Is the only option to chmod the file
Have you tried using printf?
-Original Message-
From: Ramón Chávez [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 11, 2003 9:07 AM
To: [EMAIL PROTECTED]
Subject: Formatting Variables.
Hello boys and girls.
Is there a way to give format to a Variable.
I mean, if I don't want to get
How do I test a variable to see what type of variable it is(scalar, array,
hash, etc...)?
What I am trying to accomplish is I have a hash and some values are scalar
data and some values are nested hashes and
I need a way to tell the difference.
Book or web site references are welcome, thanks in
Pink is first edition, blue is second edition, i think there is a third
edition out now, may as well go for the latest and greatest
-Ken
-Original Message-
From: Robbie Staufer [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 15, 2003 12:20 PM
To: [EMAIL PROTECTED]
Subject: Re: Perl
Try putting the -T after the -w at the top of your perl script, make sure
that your script ends in .cgi and your iis is setup to run scripts and
change
print $q-header (text/plain);
to
print $q-header (text/html);
-Original Message-
From: Paul Kraus [mailto:[EMAIL PROTECTED]]
Sent:
mailing list.
-Ken
-Original Message-
From: Paul Kraus [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 07, 2003 3:11 PM
To: 'Ken Lehman'; 'Perl'
Subject: RE: Cgi Win xp Perl
It still just displays the contents of my script rather then running it.
Do I need to some how associate .cgi
Is there a way for my program to execute a few lines of code before dying
when it is sent a kill -9 from a unix shell? The book I have says no, I
don't want to ignore the signal, just some clean up.
Thanks.
-Ken
This works where I am at, you could give it a try
!--#exec cmd=./my_perl_script_here.pl--
-Original Message-
From: Adam Wilson [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 10, 2002 11:27 AM
To: [EMAIL PROTECTED]
Subject: include .pl in html
Hi,
can anyone help me, i want to
I would like to write a perl script for windows that in the right situation
fires off another program, the problem is I can't get it to work using
system or exec calls. The file is in the program files directory I tried
system(c:\program files\etc...) and some variations but I can't get it to
I can't say:
#!/yadayada/perl -w
use strict;
$seen = true;
if( $seen )
{
#whatever
}
else
{
#something different
}
I get a bareword error, I'm using perl 5.004_04. Does perl support booleans
like this, do I need to use a package?
Thanks in advance
-Ken
Say I have a foreach loop that I used to modify elements when they match a
pattern that I am searching for, but there is one special case where I get a
match and I need the index for that element. Can I get that index or do I
have to go with a for() loop. If this can be done how would I use it?
]]
Sent: Friday, November 22, 2002 4:12 PM
To: [EMAIL PROTECTED]
Subject: Re: howto: array index inside a foreach loop
Ken Lehman wrote:
Say I have a foreach loop that I used to modify elements when they match a
pattern that I am searching for, but there is one special case where I get
a match
18 matches
Mail list logo