in reply to Dynamically changing the value of a passed variable into a sub
This will change the variable that is passed to it as the @_ variable is really just a list of aliases (see. rinceWind's node for more info on the magicality of @_).sub TimeStamp($) # Pass the stamp in as YYYYMMDD { if( $_[0] =~ /(\d{4})(\d{2})(\d{2})/ ) { #returns in MMDDYYYY $_[0] = "$2/$3/$1"; } else { warn "Invalid input to TimeStamp()" } }
_________
broquaint
|
|---|