Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re: regex on previous lines

by LanX (Bishop)
on Jan 31, 2013 at 17:28 UTC ( #1016365=note: print w/replies, xml ) Need Help??

in reply to regex on previous lines

read lines reversed into an array

@lines=reverse <$fh>


@lines=reverse split /\n/, $multiline

Now you can loop over @lines and exit with last whenever a regex fails.

Cheers Rolf

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1016365]
[marto]: the price for cheap tablets that I can actually put an open ROM on, compared to the price for a cheap Chinese intel tablet I could wipe and put Linux on
[Corion]: marto: Ah, yeah. If you can actually put Linux on them. I'm somewhat wary of the new Win10 Atom tablet thingies that are sold for ~EUR 280, and whether you can enter their UEFI at all to install Linux there. But that's sure worth a try.
[marto]: The ~60 Windows 10 intel based tablets would be a decent candidate
[Corion]: marto: Oh - yeah, that really sounds sensible

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (9)
As of 2018-05-23 11:06 GMT
Find Nodes?
    Voting Booth?