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

Re^2: regex expression help

by JFarr (Sexton)
on Nov 08, 2005 at 17:25 UTC ( #506813=note: print w/replies, xml ) Need Help??


in reply to Re: regex expression help
in thread regex expression help

Yes, the values were grabbed from a file. How will that prind statement show newlines? I have alread checked the values in the file. Would it make a difference if I made the string I'm searching in seperated via commas?

Replies are listed 'Best First'.
Re^3: regex expression help
by sauoq (Abbot) on Nov 08, 2005 at 18:37 UTC
    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.";
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2023-05-30 17:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?