yes, you are missing use strict; and use warnings; from the top of your script. If you were to have these included then you would find out that you have a typo in your regex: $baseDir is not defined - it should be $subdir - and your filehandle <data> is invalid - it should be <DATA>.
other than that your code works as you expect
larryk perl -le "s,,reverse killer,e,y,rifle,lycra,,print"
In reply to Re: file data
by larryk
in thread file data
by DS
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |