Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^3: Perl Get issue

by ColonelPanic (Friar)
on Nov 14, 2012 at 11:48 UTC ( #1003789=note: print w/replies, xml ) Need Help??


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

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

Replies are listed 'Best First'.
Re^4: Perl Get issue
by perlnoobster (Sexton) on Nov 14, 2012 at 12:50 UTC
    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.

        The problem is that regexes are not a robust way to parse HTML. You may be parsing a given page correctly, but if that page ever changes, your regexes will break.

        See http://htmlparsing.com/perl.html for some examples of how to do it right, and http://htmlparsing.com/regexes.html gives more details about why regexes are a bad idea.

        xoxo,
        Andy

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1003789]
help
Chatterbox?
[Corion]: Maybe the solution would be a tablet (with pens), like the Wacom tablets, but you still need good software and need to know how to operate it well in an interactive setting ;)
[ambrus]: Corion: the solution depends on who for. Some non-math presentations need to show lots of graphics or photos, with fine details and color. For those, blackboard or overhead transparencies aren't so good (yes, you can print on transparencies, but there's s
[ambrus]: ome quality limits), but film projection or computer projector is fine.
[ambrus]: A minority of math presenters are traditional and don't want to operate a computer. For them, handwritten overhead transparencies and blackboard are fine.
[Corion]: BTW, has anybody seen the Microsoft Surface Studio thing live?
[ambrus]: Some will operate a computer, but want to operate crazy unusable android-like GUIs. For those, printed overhead transparencies or simple slide editors and maybe even tablets are fine.

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (9)
As of 2017-09-26 10:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (293 votes). Check out past polls.

    Notices?