in reply to Re: How do I stop printing a hash value
in thread How do I stop printing a hash value

I am using the below
if ((scalar @$value) && not grep (/\/\*(.*)\*\//,@$value)) { }

Replies are listed 'Best First'.
Re^3: How do I stop printing a hash value
by PeterPeiGuo (Hermit) on Dec 18, 2010 at 02:09 UTC

    Read the document for "grep" more carefully. The following might be a starting point for you, and you can continue from here:

    print join(",", grep(!/\/\*(.*)\*\//, @$value));

    Peter (Guo) Pei

      Thanks for all your help.The following works for me.

      if (scalar @$value) { # check that the arrayref isn't empty my @arr = grep(!/^\/\*/, @$value); print "\n ", join(", ", @arr), "\n\n"; }