bash-3.1$ weather --weather Newcastle | ./regex.pl panic: top_env ============================================================================= The output from (weather --weather Newcastle) the regex would be processing: ============================================================================= bash-3.1$ weather --weather Newcastle Newcastle Light Rain Late Light Rain Late. Morning Clouds. Warm. ============================================================================= ( regex.pl ) ============================================================================= #!/usr/bin/perl -w use strict; my $regex = qr/\s* \w+/; while(<>) { use re 'eval'; /(?(?{$_ =~ |$regex (\w+ \w+)(?=\1)|})(?{s|$1||})|(?{s|$1 \w+||}))/; } =============================================================================== Conclusion =============================================================================== From what i can gather from lurking google, code sub-patterns are very experimental and bug prone, ofcourse i could be wrong, seeing as i've only recently adopted Perl in the last month once finishing my final year at school. From lurking google once more, i'm also gathering that the error message i'm receiving is a bug within perl itself, and should be reported. Bibliography: http://www.perlmonks.org/index.pl/?node_id=368099 http://prlmnks.org/html/383052.html