>>One thing in particular that I don't understand is that I thought $()
>>was evaluated before the rest of the command.
>
>Yes you're right.
Thanks for spotting the obvious mistake! I can't believe that I didn't
get it myself...
Also someone told me about set -x, which would have showed me straight
away what the problem was.
Thanks again,
Matt
--
#!/usr/bin/perl
$A='A';while(print+($A.=(grep{($A=~/(...).{78}$/)[0]eq$_}" A A A "
=~m{(...)}g)?"A":" ")=~/([ A])$/){if(!(++$l%80)){print"\n";sleep 1}}