Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

In Perl,

Name: Anonymous 2012-03-08 5:53

In Perl, split(/anus/, $anii)[0] doesn't work. But (split(/anus/, $anii))[0] correctly returns the first anus.

What gives?

Name: Anonymous 2012-03-08 6:13

That's just the way it works.

sub anus { return $_ }
(anus('anus'))[0]

Name: Anonymous 2012-03-08 13:52

Scalar vs. list context. A built-in or subroutine is capable of determining its context before it returns a value with wantarray.

Name: Anonymous 2012-03-10 4:13

So Perl sucks?

Name: Anonymous 2012-03-10 5:45

>>4
Polecat Kebab you non-programmer

Name: Anonymous 2012-03-10 6:20

>>4
Basically.

Name: Anonymous 2012-03-10 8:10

>>4

Thank you for stating the obvious.

Name: Anonymous 2012-03-10 19:12

>>6,7
Non-programmers detected.

Name: Anonymous 2012-03-10 19:56

>>8
indeed. Real programmers quickly learn that everything sucks.

Don't change these.
Name: Email:
Entire Thread Thread List