Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re^3: Secret Perl Operators: The Highlander's List Asserter

by ikegami (Pope)
on Jul 31, 2006 at 19:38 UTC ( #564847=note: print w/replies, xml ) Need Help??

in reply to Re^2: Secret Perl Operators: The Highlander List Asserter
in thread Secret Perl Operators: the boolean list squash operator, x!!

"Boolean Cast Operator" would be a less cryptic name than "Highlander Operator" for !!.

It's not even correct to say it returns 1. For example, print "[", !!1, "]" prints []. For a true argument, !! returns the dualvar 1/''.

Update: I got it backwards. True = dualvar (PVNV) 1/'1', False = dualvar (PVNV) 0/''.

Replies are listed 'Best First'.
Re^4: Secret Perl Operators: The Highlander's List Asserter
by shmem (Canon) on Jul 31, 2006 at 19:47 UTC
    Hmm? Is that platform dependent?
    lt-gm [gm] 21:43 ~ > perl -le 'print "[", !!1, "]"' [1]

    Linux, perl 5.8.8. I choose "Higlander Operator" following the unstated naming conventions other secret operators follow ;-)


    _($_=" "x(1<<5)."?\n".q/)Oo.  G\        /
                                  /\_/(q    /
    ----------------------------  \__(m.====.(_("always off the crowd"))."
    ");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://564847]
[james28909]: ok maybe i need to ask this question in sopw and not CB but here goes
[james28909]: i am manually parsing html, and am trying to wrap my head around keeping up with tag counts
[james28909]: i can extract a certain tree manually by regexing the html file for a starting anchor, then i send the position of the match to a sub and then seek to that position in the file and keep up with div tags (for now)
[james28909]: how can i manage multiple tags? other than div?

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (9)
As of 2017-04-25 03:55 GMT
Find Nodes?
    Voting Booth?
    I'm a fool:

    Results (448 votes). Check out past polls.