in reply to Converting bash script to perl

I'd recommend merlyn's most excellent sh2perl

/J\