Perl one-liners inside double-quotes generally aren't a problem on Linux unless there's a scalar variable in the code - and I deliberately crafted my one-liner without inclusion of a scalar variable in order to achieve that portability ;-)
You were also careful to ensure (or just lucky) that your code did not contain any of the default history control characters in a valid combination: !, ^ and #. These can vary from shell to shell and can (in many shells) be changed to other characters by the user. Try some of these rather contrived examples which will work if single quotes are used instead:
- perl -E "say q/Hello!/"
- perl -E "say q/Hello!!/"
- perl -E "say q/found/ if shift =~ /^foo[^!#]/" foobar
IMHO there is no reason not to use single quotes to delimit the entire script on the command line in any non-MSWin32 system and it is almost always the better choice where shell interpolation is not expressly intended.