chomp not working 
Author Message
 chomp not working

Just learning Perl, each time i try to use chomp i get the following error:

""chomp" may clash with future reserved word at ./chomp_test line
3syntax error i
n file ./chomp_test at line 3, next 2 tokens "chomp("
Execution of ./chomp_test aborted due to compilation errors."

I'm using perl5.00502 on FreeBSD 2.2.8

Any explainations/ suggestions?

TIA, johnne

 Sent via Deja.com http://www.*-*-*.com/
 Share what you know. Learn what you don't.



Sun, 20 Jan 2002 03:00:00 GMT  
 chomp not working

Quote:

> Just learning Perl, each time i try to use chomp i get the following error:

> ""chomp" may clash with future reserved word at ./chomp_test line
> 3syntax error i
> n file ./chomp_test at line 3, next 2 tokens "chomp("
> Execution of ./chomp_test aborted due to compilation errors."

> I'm using perl5.00502 on FreeBSD 2.2.8

Are you sure about that?  Let's see a code snippet, please.

- Tom



Sun, 20 Jan 2002 03:00:00 GMT  
 chomp not working

Quote:

>Just learning Perl, each time i try to use chomp i get the following error:

>""chomp" may clash with future reserved word at ./chomp_test line
>3syntax error in file ./chomp_test at line 3, next 2 tokens "chomp("
>Execution of ./chomp_test aborted due to compilation errors."

>I'm using perl5.00502 on FreeBSD 2.2.8

Are you absolutely sure? It sounds like Perl4.

Try this in a script:

        #! /usr/local/bin/perl -v

        Bart.



Sun, 20 Jan 2002 03:00:00 GMT  
 chomp not working
Just learning Perl, each time i try to use chomp i get the following error:

""chomp" may clash with future reserved word at ./chomp_test line
3syntax error i
n file ./chomp_test at line 3, next 2 tokens "chomp("
Execution of ./chomp_test aborted due to compilation errors."

I'm using perl5.00502 on FreeBSD 2.2.8

Any explainations/ suggestions?

TIA, johnne

 Sent via Deja.com http://www.deja.com/
 Share what you know. Learn what you don't.



Sun, 20 Jan 2002 03:00:00 GMT  
 chomp not working

Quote:

> Any explainations/ suggestions?

Yeah.  Read the replies to your first post on the subject.

- Tom



Sun, 20 Jan 2002 03:00:00 GMT  
 chomp not working

+ ""chomp" may clash with future reserved word at ./chomp_test line

+ I'm using perl5.00502 on FreeBSD 2.2.8

No, you aren't. You may want to check that the perl refered
to on the #! line of your script is really perl5.

/whatever/path/to/perl -v

James



Sun, 20 Jan 2002 03:00:00 GMT  
 chomp not working

Quote:

>Are you sure about that?  Let's see a code snippet, please.

#!/usr/bin/perl -w
$x = "good night\n";
chomp($x);
print($x);

yields the following error message. "Chop", however, works fine:

"chomp" may clash with future reserved word at ./chomp_test line
3syntax error i
n file ./chomp_test at line 3, next 2 tokens "chomp("
Execution of ./chomp_test aborted due to compilation errors.

Thanks,

-John

 Sent via Deja.com http://www.deja.com/
 Share what you know. Learn what you don't.



Mon, 21 Jan 2002 03:00:00 GMT  
 chomp not working

Quote:

>> Any explainations/ suggestions?

>Yeah.  Read the replies to your first post on the subject.

He just might have had a reason to post twice (and, on my feed, a third
time).  I am currently seeing an unusual amount of canceled messages,
two copies of John Embow's among them.  Some cancelbot run wild?

Anno



Mon, 21 Jan 2002 03:00:00 GMT  
 chomp not working

Quote:

> >Are you sure about that?  Let's see a code snippet, please.

> #!/usr/bin/perl -w
> $x = "good night\n";
> chomp($x);
> print($x);

> yields the following error message. "Chop", however, works fine:

> "chomp" may clash with future reserved word at ./chomp_test line
> 3syntax error i
> n file ./chomp_test at line 3, next 2 tokens "chomp("
> Execution of ./chomp_test aborted due to compilation errors.

You're using Perl 4.

Try creating a program with:

#!/usr/bin/perl -v

as the first line.  It could just be that /usr/bin/perl is a link to an
old version that's still on your system.

Also, if you haven't seen past replies in this thread, your news server
has a problem.

- Tom



Mon, 21 Jan 2002 03:00:00 GMT  
 chomp not working


Quote:
>He just might have had a reason to post twice (and, on my feed, a third
>time).  I am currently seeing an unusual amount of canceled messages,
>two copies of John Embow's among them.  Some cancelbot run wild?

>Anno

Three of mine have been cancelled.  I won't lose any sleep over it.
--
Malcolm Ray                           University of London Computer Centre


Mon, 21 Jan 2002 03:00:00 GMT  
 chomp not working
     [courtesy cc of this posting mailed to cited authors]



:>He just might have had a reason to post twice (and, on my feed, a third
:>time).  I am currently seeing an unusual amount of canceled messages,
:>two copies of John Embow's among them.  Some cancelbot run wild?
:
:Three of mine have been cancelled.  I won't lose any sleep over it.

Cancelled by whom, though?  Someone should track this down.  
Perhaps it's a script kiddie who got RTFM'd. :-)

--tom
--
I use `batshit' in an idiosyncratic fashion. --Andrew Hume



Mon, 21 Jan 2002 03:00:00 GMT  
 chomp not working

???

Quote:
> #!/usr/bin/perl -w
> $x = "good night\n";
> chomp($x);
> print($x);

> yields the following error message. "Chop", however, works fine:
> "chomp" may clash with future reserved word at ./chomp_test line

Smells like you've got a version of Perl that was released longer ago than
"Pulp Fiction". Perl 4 is an antique; upgrade!

--
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



Mon, 21 Jan 2002 03:00:00 GMT  
 chomp not working

[posted and emailed]


Quote:
> Cancelled by whom, though?  Someone should track this down.  
> Perhaps it's a script kiddie who got RTFM'd. :-)

Here's one

Path:
cern.ch!EU.net!news-peer.gip.net!news.gsl.net!gip.net!news-peer1.sprintlink.net!
news-in-central.sprintlink.net!news.sprintlink.net!news.VirtualVillage.com
Newsgroups: comp.lang.perl.misc




Date: Thu, 5 Aug 1999 05:08:27 -0500
Lines: 3
X-Newsreader: Microsoft (R) Exchange Internet News Service Version 5.5.2448.0

There seemed to be a whole batch of them, targetting a whole swath of
posters here.  Not all the victims were regulars (though an ingenious
kiddie would presumably cancel his own postings too, to confuse the
hunt).



Mon, 21 Jan 2002 03:00:00 GMT  
 chomp not working

(I'm superseding my previous posting)

Further investigation shows that the cancels that we've been discussing
here were not targetted specifically at clpm; the offender had clearly
been at it for at least 40 minutes before the cancel that I had picked
up and am quoting below, and had been rampaging across comp.* groups in
the meantime.  Some kind of pathetic script kiddie, presumably.

Curiously the attack didn't seem to have got a mention on the
news.admin.net-abuse* groups, at least not until TC posted one.

Quote:
> Path:
> cern.ch!EU.net!news-peer.gip.net!news.gsl.net!gip.net!news-peer1.sprintlink.net!
> news-in-central.sprintlink.net!news.sprintlink.net!news.VirtualVillage.com
> Newsgroups: comp.lang.perl.misc




> Date: Thu, 5 Aug 1999 05:08:27 -0500
> Lines: 3
> X-Newsreader: Microsoft (R) Exchange Internet News Service Version 5.5.2448.0




Mon, 21 Jan 2002 03:00:00 GMT  
 
 [ 18 post ]  Go to page: [1] [2]

 Relevant Pages 

1. CHOMP not working on some servers

2. CHOMP not working

3. chomp not chomping w/ new $/ char

4. correction to previous post - chomp, not chop!

5. chomp not chomping?

6. Is chomp in perl 4 or not?

7. Send mail script not working in 2nd server but working in 1st server

8. Send mail script not working in 2nd server but working in 1st server

9. DBD::XBase 'not' not working

10. External DTD not working in XML::DOM ! (fwd)

11. Crypt() not working for me

12. Overloaded += not working from xsub

 

 
Powered by phpBB® Forum Software