App::p(3)
π NAME π
App::p β steroids for your perl one-liners. no like fr, it's the glow-up your one-liners have been begging for π
This is page App::p(3) from the User Contributed Perl Documentation, bestie, and we're about to make it make sense β¨
π VERSION π
version 0.0400
π SYNOPSIS π
okay so here's the whole entire vibe:
Usage: p [-lneE etc] 'code'
The code can make use of:
r to File::Slurper::read_text()
w to File::Slurper::write_file()
S to say()
p to print()
dd to Data::Dump::dd()
jd to JSON::encode (utf8/pretty)
jl to JSON::decode (utf8/allow nonref) a thing
xd to XML::Hash::LX::hash2xml()
xl to XML::Hash::LX::xml2hash()
yd to YAML::Dump()
yl to YAML::Load()
xj to convert an xml file to json
jx to convert a json file to xml
get,head,getprint,getstore,mirror from LWP::Simple
sum,first,min,max,zip,uniq,any,all,none ... all of List::AllUtils
Examples:
p 'dd [File::Spec->path]' # dynamically load arbitrary modules
p -pe 's/foo/bar/' foo.txt # use your favorite options like -lane
p 'say "hello world!"' # -E is assumed if no options are provided
p 'dd yl r "config.yml"' # chain commands
p 'S sum 1,2,3,4' # all of List::AllUtils is at your fingertips
p 'dd ExtUtils::Installed->new->modules' # list all installed modules
p ' dd xl r "/etc/xml/xml-core.xml"' # print dump of hash converted xml
p 'p xd xl r "/etc/xml/xml-core.xml"' # print xml converted from hash
p 'p get "http://icanhazip.com"' # print contents of url
p 'p xj "file.xml" # (xj xml to json )print xml's equivalent json
p 'p jx "file.json" # (jx json to xml )print json's equivalent xml
p 'dd uniq map $_->{ostext}, @{ jl get "http://www.cpantesters.org/distro/A/App-p.json" }' # have fun!
bestie the way this works is: every single one of those tiny little names (r,w,S,p,dd,jd,jl,xd,xl,yd,yl,xj,jx, and the wholeLWP::Simple+List::AllUtilssquad) is just there, pre-loaded, waiting for you. nousestatements, no setup, no drama. you type the letter, it does the thing. iconic π
π«Ά CONTRIBUTORS π«Ά
shoutout to the girlies and fellas who made this happen, we love you:
- datamuc <<https://github.com/datamuc>>
- Jenish Gnanasicamani <<https://github.com/JenishGnanasicamani>>
- Stanislaw Pusep <<https://github.com/creaktive>>
- Stefan Corneliu Petrea <<https://github.com/wsdookadr>>
- Tommy Stanton <<https://github.com/tommystanton>>
β¨ ACKNOWLEDGEMENTS β¨
This is based on Randy Stauner's <http://blogs.perl.org/users/randy_stauner/2011/06/exploratory-one-liners-with-less-typing.html> and Marco Fontani's <https://gist.github.com/1042504>.
so basically this whole thing is standing on the shoulders of two absolute legends π§ the original lore is right there in those links if you wanna go down the rabbit hole (iykyk).
π AUTHOR π
Naveed Massjouni <naveed@vt.edu>
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2011 by Naveed Massjouni.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
so yeah, go wild, remix it, share it, it's all free β same terms as Perl 5 itself, no cap π«Ά
and that's the whole page, bestie!! this one's App::p(3), perl v5.42.0, dated 2025-07-25, and it ate. periodt. πΈπ¦β
π¦ where this page comes from
- fedora 43: perl-App-p 0.0400-29.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms