in reply to A Macro System for Perl?
...but got#!/usr/bin/perl -w sub testrun() { my $r = run('noexit'); print "ret: $r\n"; } sub run { my $noexit = shift; my $retorexit = $noexit ? \&return : \&exit; &$retorexit(1); } testrun();
Undefined subroutine &main::return called at ./foo line 10.retorexit could indeed be a macro...
Marc
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: A Macro System for Perl?
by samtregar (Abbot) on Mar 25, 2008 at 21:47 UTC | |
by cramdorgi (Acolyte) on Mar 26, 2008 at 08:32 UTC | |
by samtregar (Abbot) on Mar 26, 2008 at 15:40 UTC |