Skip to content

Commit

Permalink
conditionalize $1
Browse files Browse the repository at this point in the history
  • Loading branch information
chicks-net committed Nov 20, 2014
1 parent 5dea930 commit ffff03c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions megamap
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,11 @@ foreach my $line (@megalines) {
next;
}

$ls_out =~ /wwn-(0x[\da-f]+) /;
$slot_map{$slot}->{linux} = $1 || 'bug';
my $linux_wwn = 'unk';
if ( $ls_out =~ /wwn-(0x[\da-f]+) / ) {
$linux_wwn = $1 || 'bug';
}
$slot_map{$slot}->{linux} = $linux_wwn;

$ls_out =~ s/.* //;
$ls_out =~ s{[./]}{}g;
Expand Down

0 comments on commit ffff03c

Please sign in to comment.