if vmXX.txt is passed to notify.pl strip .txt

This commit is contained in:
mischa 2024-05-09 20:33:27 +02:00
parent 06b1de99fa
commit 1444d5cc01
1 changed files with 5 additions and 1 deletions

View File

@ -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';