in reply to Zipping the contents of a directory by filename

Read substr's documentation carefully. substr $files, 7 doesn't return the first 7 letters, it returns the string from the 8th character to the end.

my $s = '123456789'; say substr $s, 7; # 89 say substr $s, 0, 7; # 1234567
map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Replies are listed 'Best First'.
Re^2: Zipping the contents of a directory by filename
by justin423 (Scribe) on May 29, 2025 at 15:42 UTC
    that was it... I knew it was something small...

      Caltrops are small-ish, but then who looks down?!

      --hsm

      "Never try to teach a pig to sing...it wastes your time and it annoys the pig."