in reply to Re: split question
in thread split question

Cool. Thank you! But now I have decided to print fields 1 and 4, however I cannot get past this error:
Use of uninitialized value in concatenation (.) or string at san_relat +ion.plx line 81, <$output> line 3.

# @vpaths contains vapt0..vpath## for my $vps (@vpaths) { print "\n"; open my $output, "lspv -l $vps |" or die $!; #<$output>; #<$output>; for (<$output>) { next if m[distribution|n/a]i; next unless defined; print Dumper(my ($f1,$f4) = (split)[0, 4]); print "$f1\t$f4\n"; #print +(split)[0],"\n"; #print +(split)[4],"\n"; } print "\n"; #system("odmget -q name=$vps 'CuAt'|grep -p pvid"); } from the Dumper output VAR2 is the problem $VAR1 = 'vpath0:';
$VAR2 = undef;
Use of uninitialized value in concatenation (.) or string at san_relat +ion.plx line 81, <$output> line 3. vpath0: $VAR1 = 'lvREPdata10'; $VAR2 = '/db2/REP/sapdata10'; lvREPdata10 /db2/REP/sapdata10