in reply to Re: comments and qw
in thread comments and qw
It might be useful to skip blank lines (or lines that just contain comments) like the real qw():
sub qwx { local $_ = @_ ? $_[0] : $_; s/[#].*$//mg; s/^\s+//; s/\s+$//; s/\s+/ /g; return split ' ', $text; }
Also, you could tweak the appearance of caller a little as follows:
my @items = qwx" this is # possibly a # commented list ";
Single quote won't work without a space before it.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: comments and qw
by rnahi (Curate) on Feb 12, 2006 at 20:32 UTC | |
by ikegami (Patriarch) on Feb 13, 2006 at 03:08 UTC |
In Section
Seekers of Perl Wisdom