I want to place this one string into two vars. Then i will compare these vars to a list of strings using __DATA__
So I'd like to see from Dumper VAR1 and VAR2?
thank you!
sample data from OS command: root@dxxxxx:/export/resources/SOX/scripts> fcstat fcs0|grep -i node |c +ut -f2 -d: 0x20000000C95C0379 __OUTPUT__ $VAR1 = ' 0x20000000C95A58AE '; $VAR1 = ' 0x20000000C95C0379 '; __CODE__ use strict; use warnings; use Data::Dumper; my @hbas; open (LSDEV, "/usr/sbin/lsdev |") or die $!; while (<LSDEV>) { if ( /^(fcs\d+)/ ) { push (@hbas, +(split)[0]); } } my %hoh; for my $hba (@hbas) { $hoh{$hba} = qx(/usr/bin/fcstat $hba|/usr/bin/grep -i node|/usr/bin/cut -f2 +-d:); } while (my ($key, $val) = each %hoh) { #print "$key =>\n\t$val\n"; #print "\n"; $\ = "\n"; print Dumper($val); my $str = split /\s+/, $val; print $str; }
In reply to two vars from one string. by mikejones
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |