in reply to How do I stop printing a hash value

No, your problem has nothing to do with hashes. You want to stop printing some elements of an array.

You can use grep to filter out the elements you are passing to join.

  • Comment on Re: How do I stop printing a hash value

Replies are listed 'Best First'.
Re^2: How do I stop printing a hash value
by iphone (Beadle) on Dec 18, 2010 at 01:07 UTC

    ya..right,to be be exact my query is how do I grep for a comment?

      Q2. A2.   RTFM: perldoc -f grep

      Q1. A1.   perldoc perlretut

      or, work out what's happening here:

      ... for my $var(@var) { # as ikegami said, you're not working +with a hash if ( $var !~ /\/* .*? \/*/ ) { print "\$var, \'$var\', is (something for iphone to fill in) \ +n"; } else { print "\$var, \'$var\', is (the reverse) \n"; } } ...
      I mean I tried the below but doesnt seem to work for me
      if ((scalar @$value) && not grep (/\/\*(.*)\*\//,@$value)) { }