Help for this page

Select Code to Download


  1. or download this
    open(my $find,"|-:utf8","find /usr/local/bin -type f") or die "find fa
    +iled: $!\n";
    
    ...
      chomp;
      push @array, $_;
    }
    
  2. or download this
    open( my $find, ... ) # (same as above, without redirecting to "/dev/n
    +ull")
    my @array = <$find>;  # reads all lines into array
    chomp @array;         # strips linefeeds from all array elements