Beefy Boxes and Bandwidth Generously Provided by pair Networks vroom
"be consistent"
 
PerlMonks  

Re: use strict;

by snowrider (Pilgrim)
on Feb 01, 2001 at 17:36 UTC ( [id://55779]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to use strict;

monks, sorry about not attaching my code here it is.
#!/usr/contrib/bin/perl -w use strict; my $a="5.0"; my $b="5"; print "Are these variables equal as numbers? ",$a==$b,"\n"; print "Are the variables equal as strings? ",$a eq $b,"\n"; print "These variables are equal as strings\n" if($a eq $b); print "These variables are equal numerically\n" if($a==$b);
snowrider

Replies are listed 'Best First'.
Re: Re: use strict;
by arturo (Vicar) on Feb 01, 2001 at 17:42 UTC

    Looks ok to me ... are you sure there's a perl interpreter at the location specified in your '#!' line? Try issuing the following on the command line and see what you get: which perl

    Philosophy can be made out of anything. Or less -- Jerry A. Fodor

Re: Re: use strict;
by davorg (Chancellor) on Feb 01, 2001 at 17:43 UTC

    When you're running perl script.pl you are using the version of Perl from your path. This seems to be fine.

    When running ./script.pl you're using the version in /usr/contrib/bin/perl. Looks like that's Perl version 4. to confirm this type
    /usr/contrib/bin/perl -v at your command line.

    To fix it, find out which version of Perl is on your path by typing which perl and replace the /usr/contrib/bin/perl in your script with the results of that command.

    --
    <http://www.dave.org.uk>

    "Perl makes the fun jobs fun
    and the boring jobs bearable" - me

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://55779]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.