in reply to perl -pi -e s'/^\s+//'g $file

The equivalent of your one-liner without a system call:
{ local @ARGV = ($file); local $^I = '.bac'; while(<>){ s/^\s+//; print; } }

Replies are listed 'Best First'.
Re^2: perl -pi -e s'/^\s+//'g $file
by david_lyon (Sexton) on Apr 08, 2011 at 02:24 UTC
    Thanks again wind very nicely done....I will start using it.