sub normalise{ my $network_device_polling_data = shift; $network_device_polling_data =~ tr/.../.../; $network_device_polling_data =~ s/..../..../; $network_device_polling_data = quotemeta( $network_device_polling_data ); ...; return $network_device_polling_data; } #### sub normalise_network_device_polling_data { my $data = shift; $data =~ tr/.../.../; $data =~ s/..../..../; $data = quotemeta( $data ); ...; return $data; } #### sub normalise_network_device_polling_data { die "This is a procedure not a function" if defined wantarray; for ( @_ ) { tr/.../.../; s/.../.../; $_ = quotemeta; } }