Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

thanks for your kind reply.

a) in fact I insert"use warnings" and "use strict" in my code. I just omitted them for simple demo of my code. And in my real code I didn't miss quote, it is a type error here. Any way, thanks for your kind remind.

b) accroding to your ideas,I use

open $temp_file_cy, "$File::Find::name"

it is interesting that I haven't see "open $filehandle ...", but always "open filehandle ...". in the text book. Can you tell me the difference between them? thanks.

c) I have checked the attributes of those files, they are all -rw-rw----, so I guess "-r " should be ok here. In fact what I want to do really is this:

 my @matching = grep {/$pattern/} <temp_file_cy>;

I always get this message: " readline() on unopened filehandle temp_file_cy at ../cy_find line 99", which make me to insert code "-r temp_file_cy" to see what happened

can you give me some help on this? thanks


In reply to Re^2: quston n File::Find by skyworld_chen
in thread question n File::Find by skyworld_chen

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2024-04-26 00:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found