in reply to Re: an attempt at misdirection
in thread an attempt at misdirection

It requires perl version 5.6.0 or higher. It sounds like you are using a version that predates that. It should work if you just remove the "our" on the first line.

(update:) then again, tests don't reveal that:

fred$ perl #!/usr/bin/perl -w package DB;$sub='main::er';sub BEGIN {$^P=1 unless$sub; $^P or $_="Not just another perl hack"}sub sub(hack){print $sub =~ /([^:]+)$/, $", or &$sub} *hacker = \&sub; package main;sub er {print ",\n"}sub just {for(split' '=>`perldoc` ){print $1 if /(\w{4})\d\w/;}}sub hack {print "hacker"}sub another { seek DATA, 0, 0;print +(/(\w{6})\d/)?'':$1 while <DATA>;DB::hacker();}sub perl { print }$_ and print "$_\n" ;foreach (qw{just another perl hack}) {$_->();}print "\n";
(control-D)
Segmentation fault fred$ perl -v This is perl, version 5.005_02 built for sun4-solaris-thread

Weird.

Replies are listed 'Best First'.
Re: Re: Re: an attempt at misdirection
by tachyon (Chancellor) on May 27, 2001 at 20:56 UTC

    She kinda work now, I get:

    just another perl hack CODE(0x1785a40)

    better than the infinitely boring loop it generated before. My Perl remains 5.6.0.

    tachyon