Upgrading from 11.20 to 12.4. Updated my ThisSite.pm, using the included file as a template, and pasting old data in to it. One item was the name-change of WhichRoom to WhichGroup. Ran GetArp.pl, ScanSwitch.pl which both ran cleanly. Then ran SwitchMap.pl which generated a zillion of these error messages:
Use of uninitialized value in substitution (s///) at /home/thorsond/switchmap-12.4/ThisSite.pm line 1013.
Line 1013 in ThisSite.pm is the s// line in WhichGroup:
1011: sub WhichGroup($) {
1012: # This example assumes names are XX-YY-anythingElse and so returns XX-YY
1013: s/([0-9a-z])-([0-9a-z])-.*/$1-$2/;
1014: return $_;
Seen this before? Ideas?
Anonymous
Fixed: Had to modify WhichGroup() to be:
sub WhichGroup($) {
$ = shift; ########## Added line
s/([0-9a-z])-([0-9a-z])-.*/$1-$2/;
return $;
}
You might want to change the example ThisSite.pm to include that line. Also am not sure why it's making a difference between 11.20 and 12.4.... code is otherwise pretty similar.
Odd.
danT