in reply to remove 16 Zeros

See perlintro#Simple substitution
s{0000000000000000}{}; ## remove 16 zeros

Replies are listed 'Best First'.
Re^2: remove 16 Zeros
by Anonymous Monk on Oct 15, 2015 at 20:32 UTC
    So cool!

      Folk, i need help again :-(

      how do i save this value (pvid) to a sub function in perl? there are keys defined in the sub function and they are pushed and later prints in html:

      push(@{$lsmap_slots{$key}}, $svsa); push(@{$lsmap_slots{$key}}, $physloc); push(@{$lsmap_slots{$key}}, $vtd); push(@{$lsmap_slots{$key}}, $lun); push(@{$lsmap_slots{$key}}, $backing); push(@{$lsmap_slots{$key}}, $bdphysloc); push(@{$lsmap_slots{$key}}, $status);

      how do i push pvid in this sub function?>

      i know, i have to read but Perl is very heavy for me at the Moment.

      Kind Regards

        What you have posted isn't a function :/

        but you don't save values to a sub function, functions are not storage places, functions are not variables

        you save values into variables, you save values into scalars, arrays and hashes

        you pass variables (like references) to functions

        http://perldoc.perl.org/perlintro.html#Writing-subroutines

        Now you could be asking how to push $pvid as well? But that seems kinda obvious, you just copy/paste what you have and make the var $pvid

        So first you need to figure out what you want and then communicate that effectively to us

        push @{ $lsmap_slots{$key} }, $svsa, $physloc, $vtd, $lun, $backing, $bdphysloc, $pvid, $ollyollyoxenfree, $status;