Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re: How's your Perl?

by jryan (Vicar)
on Oct 27, 2003 at 16:44 UTC ( #302429=note: print w/replies, xml ) Need Help??

in reply to How's your Perl?

Is it just me, or is #8 undefined behaivor?

Replies are listed 'Best First'.
Re: Re: How's your Perl?
by xmath (Hermit) on Oct 27, 2003 at 17:47 UTC
    undefined in what sense? Perl's behavior is defined by its source code, perhaps unless contradicted by docs.

    UPDATE ick, I got pulled into a pointless discussion. To short-circuit it: anything that works consistently (that is, not dependent on random or OS/environment-dependent factors) in perl 5.8.* is acceptable for these exercises.

      ($foo^=0)++ eq $foo++ involves an auto-increment on top of an assignment, which is undefined as far as I know.

      For more discussion: Re: Incrementing a Hash Value.

        Let's be careful to not allow this to turn into a undefined-behavior flamewar. Perl has no specifications which indicate which behaviors are mandatory and which are undefined. As far as I'm concerned, anything that works in perl is valid. If you disagree, then just accept the above for the scope of these exercises.

        note that I see no mention in perlop or perlsyn that evaluation order is undefined, unlike for example the static-var trick which *is* undefined according to the docs. That is a good reason to avoid relying on behavior in maintainable code (since it might break in future versions of perl), but it definitely no reason not to use it in the realm of obfu and obscurity :-)

        UPDATE docs != specs. documentation just describes how the thing happens to work. if something is not mentioned in the documentation, then it is undocumented, not undefined.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://302429]
[oiskuu]: I'm unfamiliar with android or SELinux. But I believe there is nothing of a kind. Unless you play with capabilities or build your own containers/ namespaces.
[davido]: I am not finding closing STDIN to be an adequate means of making getlogin return undef.
[Corion]: Maybe doing a double-fork (daemonizing) can make go that information away, but maybe not

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (8)
As of 2017-06-23 19:32 GMT
Find Nodes?
    Voting Booth?
    How many monitors do you use while coding?

    Results (554 votes). Check out past polls.