Anonymous user
File extension is in extensions list: Difference between revisions
File extension is in extensions list (view source)
Revision as of 02:37, 12 August 2014
, 9 years ago→{{header|Perl 6}}: style
(→{{header|Perl 6}}: add entry) |
(→{{header|Perl 6}}: style) |
||
Line 27:
=={{header|Perl 6}}==
<lang perl6>my @ext = < .c .o >;
for < foo.C foo.zkl foo foo. > {
when / :i @ext $ / { say "
when / '.'
default { say "$_\t (has no extension)" }
}</lang>
{{out}}
<pre>foo.C .C is in the list
foo.zkl .zkl is not in the list
foo (has no extension)
foo. . is not in the list</pre>
=={{header|Python}}==
|