in reply to Removing leading whitespace from a file?
An alternative:
Not the most efficient solution, but I'd prefer it to setting $^I, if it were in a larger program.use Tie::File; tie @file, 'Tie::File', 'test.txt'; s/^\s+// for @file;
The easiest solution was already mentioned:
perl -i -pe's/^\s+//' test.txt
In Section
Seekers of Perl Wisdom