in reply to Modifying a reference to a literal string
Keep in mind that you can directly modify the parameters passed to a function by messing with @_. You don't need to use \shift; I suggest rewriting modify_string as:
Your way isn't "wrong", but (relatively) it does a lot of extra work.sub modify_string { $_[0] =~ s/u/i/; return $_[0]; }
hdp.
|
|---|