Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: How do I stop printing a hash value

by ikegami (Patriarch)
on Dec 18, 2010 at 01:02 UTC ( [id://877716]=note: print w/replies, xml ) Need Help??


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)) { }

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://877716]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2024-05-30 03:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found