Hi,
'if ($a = $b)'
is not comparing $a to $b, it is assigning the value of $b into $a
If you want to test for numeric equivalence, use two '='s like
'if ($a == $b)'
Then your code should be fine,
Baz.
-Original Message-
From: Gross, Stephan [mailto:[EMAIL PROTECTED]]
Sent: Wednesda
I'd recommend that you do something like this:
1-assign the text clear into a variable, this will save time later on...
eg:
$clearScreen = "clear";
Then:
system($clearScreen);
will clear the screen when ever you want to do so - this is just the way i
do it...
probably better ways to do it as
Hi All,
I have the subroutine as follows, if I type any number other than 0 thru 7
it's fine,
but if i give a string or a char as an input it of course will not function
correctly.
What can I put in the first if statement to reject characters, I was
thinking about
an unless statement, but I don
hift;
This will take the first (and only) element in @_ and assign it to $vInput.
-Original Message-
From: Barry Carroll [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 07, 2001 11:03 AM
To: '[EMAIL PROTECTED]'
Subject: Newbie Question about subroutine
Hi all, i want to have a
sorry guys i got it, silly mistake
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Hi all, i want to have a subroutine for checking user input:
here is a snippet of the code:
print ("Is your Terminal ANSI compliant?\nYes or No, \(y\) or \(n\)?\n");
chomp ($input = );
verifyInput($input);
sub verifyInput
{
# Subroutine to verify input
# Will r
Hi, i have this small but of code in a script.
My script opens a file for editing, and assigns
a filehandle 'TEMPLATE' to it.
I need to check in another part of the script if
it open or closed.
Is this code good enough for doing that job?
if (!(-e TEMPLATE))
{
sorry, i figured this one out myself,
thanks anyway! :)
-Original Message-
From: Barry Carroll [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 26, 2001 3:24 PM
To: '[EMAIL PROTECTED]'
Subject: Compiling into C source code.
Hi All,
I have a perculiar problem:
i have a p
Hi All,
I have a perculiar problem:
i have a perl script test.pl which i want to
convert into C source.
perlcc will work fine, is there any way of getting it
to generate the C source and stop.
I ask this because when i try 'perl -M0=CC, -otest3.pl.c test3.pl'
it doesn't work, it says '-o' is
Hi all,
This is my first post :)
I once saw functions such as the ones above for perl.
I am writing a script and I want to be able to determine
the machine's Operating System type.
Does anyone know where i can get these functions or
similar ones to determine the OS type.
I know how to get the
10 matches
Mail list logo