Dump before: SV = PV(0xf0c44) at 0xfe99c REFCNT = 1 FLAGS = (POK,pPOK) PV = 0xf7560 "some text here "\0 CUR = 15 LEN = 16 Dump inside trim(): $_[0] (this one is infact a 'synonym' to the actual variable; not it's copy :-) : SV = PV(0xf0c44) at 0xfe99c REFCNT = 1 FLAGS = (POK,pPOK) PV = 0xf7560 "some text here "\0 CUR = 15 LEN = 16 $s (this is a copy of the 1-st argument: SV = PV(0xf0c98) at 0xfe9c0 REFCNT = 1 FLAGS = (PADBUSY,PADMY,POK,pPOK) PV = 0xf7540 "some text here "\0 CUR = 15 LEN = 16 Dump inside bar(\$): $_[0]: SV = RV(0x11581c) at 0xf096c REFCNT = 1 FLAGS = (ROK) RV = 0xfe99c SV = PV(0xf0c44) at 0xfe99c REFCNT = 3 FLAGS = (POK,pPOK) PV = 0xf7560 "some text here "\0 CUR = 15 LEN = 16 $s (this is a copy of the 1-st argument, which is nothing more but a reference..): SV = RV(0x115828) at 0x1164b0 REFCNT = 1 FLAGS = (PADBUSY,PADMY,ROK) RV = 0xfe99c SV = PV(0xf0c44) at 0xfe99c REFCNT = 3 FLAGS = (POK,pPOK) PV = 0xf7560 "some text here "\0 CUR = 15 LEN = 16 Dump after: SV = PV(0xf0c44) at 0xfe99c REFCNT = 1 FLAGS = (POK,pPOK) PV = 0xf7560 "some text here "\0 CUR = 15 LEN = 16