diff --git a/notify.pl b/notify.pl index faf6136..6f71afa 100755 --- a/notify.pl +++ b/notify.pl @@ -34,7 +34,11 @@ my $function = $ARGV[0] || "empty"; my $function_variable = $ARGV[1] || "empty"; my $message = $ARGV[2] || "empty"; -$function_variable = substr $function_variable, 0, -4 if ($function_variable =~ m/.txt/); +if ($function_variable =~ m/.txt/) { + $function_variable = substr $function_variable, 0, -4; + $function_variable = substr $function_variable, 4; + say $function_variable; +} # define the prices for the different components of the VM my $base_price = '67';