in reply to Re^3: perldoc -lf anomaly
in thread perldoc -lf anomaly
% perldoc -v '%_' No documentation for perl variable '%_' found%_ is a special snowflake like $_ and @_ in that they can be used under strict without declaration and they all fail in the same way if you try to own them with my: Can't use global %_ in "my" (but our and local work on all of them). I like using it sometimes in one-liners and dirty scripts cause $_{$_} looks weird and cool and it works good and I like typing it! Anyway I made Claude Haiku 4.5 at duck.ai think about %_ for 36 seconds! I've never seen the robots get so confused. They insist it doesn't exist, or it's nothing special, or that it's a filehandle or a reference to the last call to stat lol:
perl -Mstrict -Mwarnings -le '%_ = ( foo => 1, bar => 2 ); print "$_ = + $_{$_}" for keys %_'
foo = 1 bar = 2So why isn't it documented? I could swear I saw it somewhere once upon a time, or maybe not... What is it??? Thanks
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: perldoc -lf anomaly (%_)
by LanX (Saint) on May 08, 2026 at 10:11 UTC | |
by LanX (Saint) on May 08, 2026 at 12:19 UTC | |
by choroba (Cardinal) on May 08, 2026 at 12:46 UTC | |
by LanX (Saint) on May 08, 2026 at 13:02 UTC | |
|
Re^5: perldoc -lf anomaly (%_)
by ikegami (Patriarch) on May 08, 2026 at 17:02 UTC |