in reply to Working With Sub-Par Code
As pointed out by Anonymous Monk, the lineif (open(OUTFILE, ... )) { push(@file_did_save, $filename); } else { push(@did_not_save, $filename . ' ' . $!); }
should probably be$config{'image_upload_dir'}.$fntwo
or, even better (with File::Spec::Functions)$config{'image_upload_dir'} . '/' . $fntwo
which would make it platform independent (and IMHO) more readable.use File::Spec::Functions; catfile($config{'image_upload_dir'}, $fntwo)
I second the perltidy recommendations.
Update: Fixed typo as noted by shmem.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Working With Sub-Par Code
by shmem (Chancellor) on Nov 29, 2007 at 12:06 UTC |