Monday 21 March 2016

Perl qw() Function

Cited from Using the Perl qw() function

Any non-alphanumeric, non-whitespace delimiter can be used to surround the qw() string argument.

The following are equivalent:
@names = qw(Kernighan Ritchie Pike);
@names = qw/Kernighan Ritchie Pike/;
@names = qw'Kernighan Ritchie Pike';
@names = qw{Kernighan Ritchie Pike};

No interpolation is possible in the string you pass to qw().

No comments:

Post a Comment