How to do strong type comparsion in Perl, like in PHP
e.g.
// same type and same value
if ($foo === $bar) {
}
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
Harry Putnam wrote:
#!/usr/local/bin/perl
use strict;
use warnings;
my $var1 = 'whoopdee';
my $var2 = 'do';
my %dispatch = (
y = \yy($var1,$var2),
this, actually, is not a code reference but a return value reference of
the yy($var1, $var2) subroutine call, executed right at the time
RC == Ryan Chan ryanchan...@gmail.com writes:
RC How to do strong type comparsion in Perl, like in PHP
RC e.g.
define type.
RC // same type and same value
RC if ($foo === $bar) {
RC }
perl uses == or eq to compare numerically or string wise. it is better
to put the control in the
Hi Uri,
Thanks for the response.
I was using both Komodo Edit and Primalscript and
didn't see a compile error, until I added the ref to $!
then I could see that my filepath was being damaged
because of the doublequotes.
The reason I wondered about the full path was because I
have been using
Thank you Thomas.
The problem was indeed the use of a double quoted string
which was wrecking my file path. Using the $! var helped me
to see that.
Learning Perl and Programming Perl both arrived today, thank
goodness!
Cheers,
Stuart
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
Ireneusz Pluta ipl...@wp.pl writes:
Harry Putnam wrote:
#!/usr/local/bin/perl
use strict;
use warnings;
my $var1 = 'whoopdee';
my $var2 = 'do';
my %dispatch = (
y = \yy($var1,$var2),
this, actually, is not a code reference but a return value reference
of the yy($var1, $var2)
Harry Putnam wrote:
Ireneusz Pluta ipl...@wp.pl writes:
Harry Putnam wrote:
#!/usr/local/bin/perl
use strict;
use warnings;
my $var1 = 'whoopdee';
my $var2 = 'do';
my %dispatch = (
y = \yy($var1,$var2),
this, actually, is not a code reference but a return value reference
of the
Harry Putnam rea...@newsguy.com writes:
However, using your suggestion:
$code-($var1, $var2);
Something I forgot to ask about that.
What if more than 1 of referenced sub routines needed vars passed in
but the needed vars were not the same?
I'm guessing that using $code-() is not such a
Harry Putnam wrote:
Harry Putnam rea...@newsguy.com writes:
However, using your suggestion:
$code-($var1, $var2);
Something I forgot to ask about that.
What if more than 1 of referenced sub routines needed vars passed in
but the needed vars were not the same?
I'm guessing that using
On Sat, 24 Apr 2010 10:06:37 -0500, Harry Putnam wrote:
Harry Putnam rea...@newsguy.com writes:
However, using your suggestion:
$code-($var1, $var2);
Something I forgot to ask about that.
What if more than 1 of referenced sub routines needed vars passed in but
the needed vars
Harry Putnam wrote:
I don't see the expected result when I press `y'.
you never print it
(The code is at the end)
It seems to do nothing.
...
non working code:
#!/usr/local/bin/perl
use strict;
use warnings;
my $var1 = 'whoopdee';
my $var2 = 'do';
my %dispatch = (
y = \yy,
Ireneusz Pluta ipl...@wp.pl writes:
Harry Putnam wrote:
I don't see the expected result when I press `y'.
you never print it
errr... yup, (corrective action taken).
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
On Thu, Apr 22, 2010 at 1:05 PM, John W. Krahn jwkr...@shaw.ca wrote:
What does that sentence mean? What would the number returned from the shell
(bash, csh, ksh, etc.) have to do with the numbers output from runmqsc
SQFR?
Perhaps he really wants to read and parse the output from the
Shawn H Corey shawnhco...@gmail.com writes:
Harry Putnam wrote:
Harry Putnam rea...@newsguy.com writes:
However, using your suggestion:
$code-($var1, $var2);
Something I forgot to ask about that.
What if more than 1 of referenced sub routines needed vars passed in
but the needed vars
Brandon McCaig wrote:
On Thu, Apr 22, 2010 at 1:05 PM, John W. Krahn jwkr...@shaw.ca wrote:
What does that sentence mean? What would the number returned from the shell
(bash, csh, ksh, etc.) have to do with the numbers output from runmqsc
SQFR?
Perhaps he really wants to read and parse the
When using File::Find;
Is there any built in way to know when you are in the top level of one
of the directories in @directories?
I mean besides grepping $File::Find::dir.
I know that give the current directory name and of course the top
directory could be massages out with something like:
Hi Raheel,
Sorry for the late response.
On Friday 23 Apr 2010 19:04:20 Raheel Hassan wrote:
Hi Shlomi and Owen,
On Thu, Apr 22, 2010 at 5:37 PM, Shlomi Fish shlo...@iglu.org.il wrote:
2.6.27.24-2 is the kernel version (which is kinda old - I'm using
2.6.33.2). I
need the Mandriva
And, whist you're at it, take a good look at your use case. I have
yet to see a use of the PHP triple-equal that wasn't a band-aid to
recover from a design error in the code.
B
On Thu, Apr 22, 2010 at 8:55 AM, Ryan Chan ryanchan...@gmail.com wrote:
How to do strong type comparsion in Perl,
Shawn H Corey wrote:
Brandon McCaig wrote:
my $cmdline = echo 'DIS CHS(*)' | runmqsc SQFR | grep CHANNEL | sort
| uniq -c;
# Open input pipe from command line.
open(my $pipe, -|, $cmdline);
open my $pipe, '-|', $cmdline or die could not open pipe: $!\n;
for my $line ($pipe)
while( my
Hi,
Has anyone experience using one of these modules? Unlike Mobile::Wurfl, I
seems to me that Apache2::WURFL Filter will take all the work once
configured?
It that accurate or am I missing something in the short documentation I have
read?
Mimi
20 matches
Mail list logo