Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Yes, the values were grabbed from a file. How will that prind statement show newlines?

Well, if you enclose the values in single quotes, and there is a newline in the value, you'll see the ending quote on a line by itself.

I have alread checked the values in the file.

Checked them for what? If you've got like one filename per line, and you are reading them in with something like my @dependantFiles = <FH>; then each value in @dependantFiles will be terminated by a newline. You might just try calling chomp(@dependantFiles) before the code you posted. That may be all you need. (Although, you could stand to make some other improvements.)

Would it make a difference if I made the string I'm searching in seperated via commas?

No. Given the code you gave us, it doesn't matter what is separating the values in your $X strings. You aren't doing anything with the separating character or even with the separate values. You are simply treating it as one string.

-sauoq
"My two cents aren't worth a dime.";

In reply to Re^3: regex expression help by sauoq
in thread regex expression help by JFarr

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 romping around the Monastery: (5)
As of 2024-04-23 06:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found