perl -e '$a="/bla/bla/123;yarg"; print (split "/", (split ";", $a)[0])[-1]' print (...)_ interpreted as function at -e line 1. syntax error at -e line 1, near ")[" execution of -e aborted due to compilation errors.