Rex::G...::File(3pm)
π Rex::Group::Lookup::File β the Perl man page, but make it bestie-coded π
okay so this is Rex::Group::Lookup::File, from the User Contributed Perl Documentation collection, section 3pm. It's a Perl module. It's cute. It reads hostnames out of a file. That's the whole assignment and she ate. π
β¨ NAME β¨
Rex::Group::Lookup::File β literally just read hostnames from a file. that's it. that's the job. no cap. π¦
πΈ DESCRIPTION πΈ
Bestie. Listen. With this module you can define hostgroups out of a file. Like, you got a file with hostnames in it? boom, that's a hostgroup now. iconic behaviour honestly. π
π«Ά SYNOPSIS π«Ά
the vibe check, in code form:
use Rex::Group::Lookup::File;
group "webserver" => lookup_file("./hosts.lst");
that's the whole thing. she's simple, she's elegant, she's main character energy. β¨
π EXPORTED FUNCTIONS π
π lookup_file($file) π
ok so with this function you can read hostnames from a file. and here's the part where i need you to lock in: every hostname goes on one line. one host, one line. that's the format. don't be weird about it. π
like so:
group "webserver" => lookup_file("./webserver.lst");
group "mailserver" => lookup_file("./mailserver.lst");
look at that alignment. the spacing. the symmetry. not me being obsessed with two lines of Perl πβ¨
so yeah, that's the whole man page bestie. go forth and group your hosts. slay. π
okay bye, this was documented as part of Perl v5.40.1, dated 2025-10-03, and yes she's still serving after all this time. periodt. π
π¦ where this page comes from
- ubuntu resolute: rex 1.16.1-1 Β· Apache-2.0
- ubuntu stonking: rex 1.16.1-1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms