Why Am I Getting a Compile Error? -SOLUTION

Why Am I Getting a Compile Error? -SOLUTION

Post by Jeff Westm » Fri, 28 Mar 2003 03:40:27



Never mind (thanks) --*pit error.


> Date: Wed, 26 Mar 2003 10:35:41 -0800 (PST)

> Subject: Why Am I Getting a Compile Error?

> This doesn't make sense to me:


> line 129:  $ordCnt = trim($result[16]);

> sub trim($) {
>     my $arg = shift;
>     chomp($arg);
>     $arg =~ s/^\s+//;
>     $arg =~ s/\s+$//;
>     return $arg;
> }    

> $ perl -c conv.pl
> syntax error at conv.pl line 129, near "result["
> conv.pl had compilation errors.

> "trim" works fine if I pass it a quoted literal such as '"  25  "'.  Why
> won't it work with an element reference?!

> -Jeff

> __________________________________________________
> Do you Yahoo!?
> Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
> http://www.veryComputer.com/

> --



__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://www.veryComputer.com/
 
 
 

1. Why Am I Getting a Compile Error?

This doesn't make sense to me:


line 129:  $ordCnt = trim($result[16]);

sub trim($) {
    my $arg = shift;
    chomp($arg);
    $arg =~ s/^\s+//;
    $arg =~ s/\s+$//;
    return $arg;

$ perl -c conv.pl
syntax error at conv.pl line 129, near "result["
conv.pl had compilation errors.

"trim" works fine if I pass it a quoted literal such as '"  25  "'.  Why
won't it work with an element reference?!

-Jeff

__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com

2. All was working like clockwork, until I decided to install Anti Virus software for Exchange 2000.

3. Why am I getting the error: "Cannot insert a duplicate key into unique index"?

4. US navaid/airport database for Navdash 2.5

5. SUCK! WHY AM I NOT GETTING THIRD EMAIL!?

6. Help

7. Why am I getting a "kids passport" message?

8. Acorn has NOT Collapsed

9. MSN Hotmail - why am I getting 2MB instead of 10MB

10. Why am I getting this warning "dataset may be incomplete" ?

11. Why am I getting this message sometimes?

12. i am getting error

13. I am getting a make error 127