On 30.09.2016 10:51, Pierre Pannetier wrote: > Well doing this, the only way i found to get files content is to split > $string with regular expressions > > my$asset =$self->req->content->asset; > my$string=$asset->slurp; > > I tried Mojo::Upload; without success. > > Anybody could drive me to get each file content without playing with > regular expressions ?
To make sure I understand you correctly: Do you have the byte stream of the file in $string as a single string, as using Mojo::Asset::Memory::slurp() would suggest? If so, splitting it on line ends to get an array of lines as in @lines = split(/\n/, $string); is indeed the way this is meant to be done (and not really what I'd call playing with regexps). Regards, Juergen. -- <[email protected]> Tel +49.30.838-50740 Fax -450740 Zentraleinrichtung fuer Datenverarbeitung, Systems Impetulant Freie Universitaet Berlin, Fabeckstrasse 32, 14195 Berlin, DE -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/mojolicious. For more options, visit https://groups.google.com/d/optout.
