|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T s
Length: 760 (0x2f8) Types: TextFile Names: »shellwords.pl«
└─⟦4f9d7c866⟧ Bits:30007245 EUUGD6: Sikkerheds distributionen └─⟦b5330643c⟧ »./cops/perl-4.019/perl.tar.Z« └─⟦2b9a58213⟧ └─⟦this⟧ »perl-4.019/lib/shellwords.pl«
#; shellwords.pl #; #; Usage: #; require 'shellwords.pl'; #; @words = &shellwords($line); #; or #; @words = &shellwords(@lines); #; or #; @words = &shellwords; # defaults to $_ (and clobbers it) sub shellwords { package shellwords; local($_) = join('', @_) if @_; local(@words,$snippet,$field); s/^\s+//; while ($_ ne '') { $field = ''; for (;;) { if (s/^"(([^"\\]+|\\[\\"])*)"//) { ($snippet = $1) =~ s#\\(.)#$1#g; } elsif (s/^'(([^'\\]+|\\[\\'])*)'//) { ($snippet = $1) =~ s#\\(.)#$1#g; } elsif (s/^\\(.)//) { $snippet = $1; } elsif (s/^([^\s\\'"]+)//) { $snippet = $1; } else { s/^\s+//; last; } $field .= $snippet; } push(@words, $field); } @words; } 1;