I haven't tested the robustness of this (nor am i going to as i feel using Test suites is the better solution), but this will work with your small example. And tell your cow-orker that C won't let you do a lot of stuff that Perl will! :Pmy $file = shift or die "USAGE: $0 [file]\n"; open CODE, $file or die "can't read $file: $!"; my $code = do {local $/;<CODE>}; eval $code; warn $@ if $@;
jeffa
L-LL-L--L-LL-L--L-LL-L-- -R--R-RR-R--R-RR-R--R-RR B--B--B--B--B--B--B--B-- H---H---H---H---H---H--- (the triplet paradiddle with high-hat)
In reply to (jeffa) Re: "use strict" not too strict
by jeffa
in thread "use strict" not too strict
by Mur
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |