in reply to Splicing and slicing
Its also dependent on your shell's idea of which characters are special. I use ksh and get a syntax error. Can you repost that as something that doesn't depend on your shell?
$ perl -we \ > 'print((split//,"\nechle etn sJutaohrPr akr")\ > [map{splice @_,@_/$^F,$^W}(@_=$%..$^F*$=/5)])' Backslash found where operator expected at -e line 1, near ")\" (Missing operator before \?) syntax error at -e line 1, near ")\" Execution of -e aborted due to compilation errors.
nevermind - here's a version that actually works
#!/usr/bin/perl -w print((split//,"\nechle etn sJutaohrPr akr") [map{splice @_,@_/$^F,$^W}(@_=$%..$^F*$=/5)])
|
|---|