From 2a8bf702bf8351539ed9d9b788869dee8b116afb Mon Sep 17 00:00:00 2001 From: Hadaq Hades Date: Wed, 7 Feb 2018 18:37:54 +0100 Subject: [PATCH] compatible with newer Perl version --- main/startup.pl | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/main/startup.pl b/main/startup.pl index 1d7068c..fbf4064 100755 --- a/main/startup.pl +++ b/main/startup.pl @@ -605,13 +605,13 @@ sub add2startup(){ die "add2startup(): one or more arguments are not defined! Exit.\n" unless( defined $subsys && defined $exec_sys && defined $cmd && defined $aref); - if( $cmd =~ /exec_script{(\w+)}/ ){ + if( $cmd =~ /exec_script\{(\w+)\}/ ){ my $exec_sys = $1; #- exec_script is followed only by one parameter [0]: script name &readScript( $aref->[0], $exec_sys ); } - elsif( $cmd =~ /exec_cmd{(\w+)}/){ + elsif( $cmd =~ /exec_cmd\{(\w+)\}/){ my $exec_sys = $1; my $args = &getArgs4cmd($aref, $subsys); @@ -1018,7 +1018,7 @@ sub cpThresholds() } {$THRPATH}gxms; # ...with lxhadesdaq path - if( $thresh =~ /\${TRBNUM}/ ){ + if( $thresh =~ /\$\{TRBNUM\}/ ){ foreach my $trb ( @{$trb_href->{$exec_sys}} ){ my $trbnum = 0; #default if( $trb =~ /etraxp?(\d{3})/ || $trb =~ /trb?\d(\d{2})/){ @@ -1030,7 +1030,7 @@ sub cpThresholds() #- replace TRBNUM $thresh =~ s{ # Substitue ... - \${TRBNUM} # ... a parameter + \$\{TRBNUM\} # ... a parameter } {$trbnum}gxms; # ... with a TRB number @@ -1095,19 +1095,19 @@ sub cmdParam(){ #- replace TRBNUM $cmd =~ s{ # Substitue... - \${TRBNUM} # ...a parameter + \$\{TRBNUM\} # ...a parameter } {$trbnum}gxms; # Raplace it with a TRB number #- replace EBIP $cmd =~ s{ # Substitue... - \${EBIP} # ...a parameter + \$\{EBIP\} # ...a parameter } {$eb_ip}gxms; # Raplace it with a EB IP #- replace EBPORT $cmd =~ s{ # Substitue... - \${EBPORT} # ...a parameter + \$\{EBPORT\} # ...a parameter } {$eb_port}gxms; # Raplace it with a EB PORT @@ -1509,7 +1509,7 @@ sub rmDeadHosts() foreach my $sys (%$trb_href){ - next unless( defined @{$trb_href->{$sys}} && $#{$trb_href->{$sys}} > 0 ); + next unless( @{$trb_href->{$sys}} && $#{$trb_href->{$sys}} > 0 ); foreach my $host (@$dead_hosts_aref){ @{$trb_href->{$sys}} = grep { !($_ eq $host) } @{$trb_href->{$sys}}; -- 2.43.0