From: Hadaq Hades Date: Wed, 7 Feb 2018 17:37:54 +0000 (+0100) Subject: compatible with newer Perl version X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=2a8bf702bf8351539ed9d9b788869dee8b116afb;p=hadesdaq.git compatible with newer Perl version --- 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}};