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

Another Monk said 'that's why we have subroutines'. I'll add to that and say, that is why we have libraries and modules:
perl -MMyPersonalFancyModule -e 'print qq|RTFM| x 99;'

Celebrate Intellectual Diversity