in reply to Multiline Hash - how to get rid of formatting?
Syntax::Feature::Ql is close to what you want. It gives you a quote-like operator ql such that:
use syntax 'ql'; use Test::More tests => 1; my $greeting = ql{ Hello World }; is($greeting, q{Hello World});
Following the same technique you could create a quote-like operator which trims whitespace from the start of each line but preserves line breaks.
If you're happy just to adjust the string with a regular expression though, you're probably looking for:
s/^\s+//mg
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Multiline Hash - how to get rid of formatting?
by tobyink (Canon) on Apr 30, 2012 at 10:18 UTC | |
|
Re^2: Multiline Hash - how to get rid of formatting?
by tospo (Hermit) on Apr 30, 2012 at 08:31 UTC |