bareword complaints in if statement 
Author Message
 bareword complaints in if statement

i have the simple if statement that barfs with the 'bareword' error
message..  "Bareword "l200" not allowed while "strict subs" in use at.."

this doesn't work as it is expected("1200" is not 1200)
       if( ( $testNum >= 100 ) && ( $testNum <= "l200" ) ) {

this generates the bareword error
        if( ( $testNum >= 100 ) && ( $testNum <= l200 ) ) {

this works just fine
       if( $testNum >= 100 ) {

how do i get this to suck up the number 1200??

thanks..  kevint



Wed, 23 Nov 2005 00:16:25 GMT  
 bareword complaints in if statement
Daer Kevint -

Quote:

> this generates the bareword error
>         if( ( $testNum >= 100 ) && ( $testNum <= l200 ) ) {

Something else must be going on; can you paste a bigger snippet of
your code (all is often good) for our perusal.

     Yours -      Billy

============================================================

                          http://www.goedsole.com:8080      
============================================================

          Lest we forget:

Good management involves five activities:

        o Facilitate your staff's efforts by removing organizational
          impediments.

        o Identify each staff member's strengths and goals
          and veer their responsibilities towards them.

        o Assign responsibility with commensurate authority.

        o Set realistic expectations in your customers.

        o Evangelize your services.

                - William Goedicke



Wed, 23 Nov 2005 00:20:47 GMT  
 bareword complaints in if statement

Quote:

>i have the simple if statement that barfs with the 'bareword' error
>message..  "Bareword "l200" not allowed while "strict subs" in use at.."

>this doesn't work as it is expected("1200" is not 1200)
>       if( ( $testNum >= 100 ) && ( $testNum <= "l200" ) ) {

^^^^^^^^  that's not 1200
Quote:

>this generates the bareword error
>        if( ( $testNum >= 100 ) && ( $testNum <= l200 ) ) {

>this works just fine
>       if( $testNum >= 100 ) {

>how do i get this to suck up the number 1200??

>thanks..  kevint



Wed, 23 Nov 2005 00:25:37 GMT  
 bareword complaints in if statement

Quote:

> i have the simple if statement that barfs with the 'bareword' error
> message..  "Bareword "l200" not allowed while "strict subs" in use at.."

> this doesn't work as it is expected("1200" is not 1200)
>       if( ( $testNum >= 100 ) && ( $testNum <= "l200" ) ) {

> this generates the bareword error
>        if( ( $testNum >= 100 ) && ( $testNum <= l200 ) ) {

> this works just fine
>       if( $testNum >= 100 ) {

> how do i get this to suck up the number 1200??

> thanks..  kevint

UGH!! typo  the 1200 is really l(like letter l)200  it is fixed...

sorry



Wed, 23 Nov 2005 00:27:53 GMT  
 bareword complaints in if statement

(snipped)

Quote:
> this generates the bareword error
>         if( ( $testNum >= 100 ) && ( $testNum <= l200 ) ) {

L I B!

Purl Gurl
--
M R Duks
M R Not
O S M R
C M Wangs?
L I B, M R Duks!



Wed, 23 Nov 2005 00:56:10 GMT  
 bareword complaints in if statement

Quote:

> i have the simple if statement that barfs with the 'bareword' error
> message..  "Bareword "l200" not allowed while "strict subs" in use at.."

> this doesn't work as it is expected("1200" is not 1200)
>        if( ( $testNum >= 100 ) && ( $testNum <= "l200" ) ) {

> this generates the bareword error
>         if( ( $testNum >= 100 ) && ( $testNum <= l200 ) ) {

> this works just fine
>        if( $testNum >= 100 ) {

> how do i get this to suck up the number 1200??

        Make sure that's not a lowercase letter L followed by 200.
        <grin>  That would make it a bareword.  Depending on your
        display font, the difference between "1" and "l" is not
        always obvious.  In fact, those two look identical to me
        in this newsreader's default compose font.

        Also make sure there's no other (unprintable) character in
        there.  I suggest deleting the entire line and retyping it
        from scratch.  You might already have tried that, but ...

        One other possibility:
                my $temp = 1200;  #Again watch out for lowercase "L"
                if (.......  $testnum <= $temp )...

                        Mike



Wed, 23 Nov 2005 00:50:55 GMT  
 bareword complaints in if statement

: i have the simple if statement that barfs with the 'bareword' error
: message..  "Bareword "l200" not allowed while "strict subs" in use at.."
:
: this doesn't work as it is expected("1200" is not 1200)
:        if( ( $testNum >= 100 ) && ( $testNum <= "l200" ) ) {
:
: this generates the bareword error
:         if( ( $testNum >= 100 ) && ( $testNum <= l200 ) ) {
:
: this works just fine
:        if( $testNum >= 100 ) {
:
: how do i get this to suck up the number 1200??

By spelling "1200" with a "1" (digit)
instead of a "l" (lowercase "L")  

:)



Wed, 23 Nov 2005 03:14:03 GMT  
 bareword complaints in if statement
In our last episode, the evil Dr. Lacto had captured our hero,

Quote:
>this generates the bareword error
>        if( ( $testNum >= 100 ) && ( $testNum <= l200 ) ) {

                                                  ^
Is that a One or an L ?


===============================================================================



Fri, 25 Nov 2005 18:19:01 GMT  
 
 [ 8 post ] 

 Relevant Pages 

1. Regexp for e-mail validation ( not totally RFC822 complaint )

2. Insecure $ENV{ENV} complaint from -T

3. a (naive?) complaint about the Pod:: modules

4. complaints about debugger

5. Seriously Off Topic, but a Common Complaint/Problem in this NG

6. The -w and complaints about 2-dimensional hashes

7. Perl book complaints wanted!

8. Spam Complaint

9. Spam Complaint

10. Spam Complaint

11. heading statement and ending statement with range command

 

 
Powered by phpBB® Forum Software