sub add_cr_to_str { # ... implementation goes here } sub add_cr_to_str_ref { add_cr_to_str( ${$_[0]} ) } sub add_cr_to_fh { add_cr_to_str( do { local $/; <$_[0]> } ) } sub add_cr_to_fn { require FileHandle; add_cr_to_sh( FileHandle->new( @_ ) ) } #### sub add_cr_to_str { add_cr_to_str_ref( \($_[0]) ) } sub add_cr_to_str_ref { # ... implementation goes here }