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

Re: Re: regular expression (search and destroy)

by giulienk (Curate)
on Nov 13, 2003 at 07:32 UTC ( #306732=note: print w/replies, xml ) Need Help??


in reply to Re: regular expression (search and destroy)
in thread regular expression (search and destroy)

Text::CSV_XS does handle embedded new lines indeed, you just have to configure your new object properly using the binary option.

I quote from the man page:

binary

    If this attribute is TRUE, you may use binary characters in quoted fields,
    including line feeds, carriage returns and NUL bytes. (The latter must
    be escaped as "0.) By default this feature is off.

I find Text::CSV_XS to be a nice solution, I never had problems once I set up object attributes correctly. Performance wise is ligthing speed, especially using the print and getline methods.


$|=$_="1g2i1u1l2i4e2n0k",map{print"\7",chop;select$,,$,,$,,$_/7}m{..}g

  • Comment on Re: Re: regular expression (search and destroy)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://306732]
help
Chatterbox?
[oiskuu]: Hm. that depends on kernel compiled with CONFIG_AUDITSYSCAL L
[tye]: apropos my several mentions of audit
[Corion]: At least my (non-SELinux) Debian has that config thing set. I don't have non-Debian machines handy (except Android)
[Corion]: My Android phone also has /proc/self/ loginuid, but that displays -1 (resp. 4GB). That might be because the phone is rooted.
[tye]: -1 means nobody logged in or the process was started before audit got booted
[davido]: ok, on my ubuntu system getlogin grabs from /proc/self/ loginuid (per strace)

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (9)
As of 2017-06-23 19:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (554 votes). Check out past polls.