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

Re^2: Perl Get issue

by perlnoobster (Sexton)
on Nov 14, 2012 at 11:05 UTC ( #1003786=note: print w/replies, xml ) Need Help??


in reply to Re: Perl Get issue
in thread Perl Get issue

Hello, Sorry I do not understand, what do you mean qr//s? do I replace (.+?) with that? Thank you :)

Replies are listed 'Best First'.
Re^3: Perl Get issue
by ColonelPanic (Friar) on Nov 14, 2012 at 11:48 UTC
    The qr part might be throwing you off. You don't need to change anything to qr; just add the s switch to the end of your regex:
    m!...!sg;
    (qr// is just the regex quote operator; in this case it was used as a generic example of how to make a . match newlines).


    When's the last time you used duct tape on a duct? --Larry Wall
      Thank you so much, it works great! however it puts the Coming soon bit on a new line, is there any method of printing the results onto the same row? Thank you!

        chomp(@array) will remove newlines from the end of each element within an array. If the newline is being placed at the start of the element you may need to preprocess the the code prior to the print. The '.' now matches newlines so you have to consider this when outputting code

        If really problematic, please post a new thread with example code and output. You may mean the same row once printed out in html for all I can tell.

Re^3: Perl Get issue
by choroba (Chancellor) on Nov 14, 2012 at 11:09 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1003786]
help
Chatterbox?
[LanX]: they?
[LanX]: click!
[choroba]: they
[LanX]: why do you think it's more than one person?
[Your Mother]: Because we are LEGION! Fix YOUR SIG SIG BLOCK!!!!
[Your Mother]: Forgot to sign in as my sockpuppet, how embarrassing!
[1nickt]: pryrt I am creating a Type to check valid user IDs, which must be a whole number greater than or equal to zero. I would like to disallow 1.0 but because of this behaviour, by the time it is checked by the constraint, it *is* an Int.
[LanX]: should this be considered? Re: Parsing .txt into arrays
[LanX]: and this Re^4: Hash user input
[pryrt]: LanX, I would vote "keep" if it were considered: it's not helpful, but it could be taken multiple ways, not all of which are offenseive...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (15)
As of 2017-05-24 20:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?