Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Re: How to check if a word is reserved

by Popcorn Dave (Abbot)
on Jun 13, 2003 at 04:30 UTC ( #265578=note: print w/replies, xml ) Need Help??


in reply to Re: How to check if a word is reserved
in thread How to check if a word is reserved

That's cool! I never knew about that, but I do have one question.

I've got the following lines in my keywords.h file:

#define KEY_x 249 #define KEY_xor 250 #define KEY_y 251

xor I get as that's a function, but x and y are reserved? What gives?

There is no emoticon for what I'm feeling now.

Replies are listed 'Best First'.
Re: Re: Re: How to check if a word is reserved
by Chmrr (Vicar) on Jun 13, 2003 at 06:49 UTC

    It's hard to spot when they look paired like that, as they do wholly different things. Proof by example:

    perl -e 'print "x is a reserved word!\n" x 3;'
    perl -e '$a = "y is a _synonym_ for tr\n"; $a =~ y/_//d; print $a;'

    perl -pe '"I lo*`+$^X$\"$]!$/"=~m%(.*)%s;$_=$1;y^`+*^e v^#$&V"+@( NO CARRIER'

      Yes, now that you show me that, I see. That hadn't even occured to me last night. Must have been too tired. Thanks!

      There is no emoticon for what I'm feeling now.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://265578]
help
Chatterbox?
[marto]: demonstrably yes, since you claim to want a safe space, your definition for which seems to be a place where you can name call, make things up or otherwise post without being challenged
[usemodperl]: no that's not it at all, meant safe for perl people, to not be hounded by weirdos obsessed with things like... whitespace :-)
[choroba]: I'm definitely not obsessed with whitespace, I rate myself among Perl people, and I haven't noticed any hounding
[marto]: "no it's not that"...."weirdos "...
[marto]: List EXE_FILES installed by CPAN so a couple of people suggest that your code looks obfuscated. I'd have to ageree, from the perspective of those who can't follow all of that one liner, it doesn't read well
Veltro is a weirdo, obsessed with whitespace
[marto]: to use the word "obsession" when so few people have said so little about it is grasping at staws
marto wishes tye was around, he's so much better at this sort of thing
usemodperl likes tye!
usemodperl tye  too

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (7)
As of 2018-06-24 15:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?



    Results (126 votes). Check out past polls.

    Notices?