Sisimai::RFC791(3pm)

πŸ“¦
version 5.7.0 Β· 3 versions
, in ubuntu stonking

πŸ’– Sisimai::RFC791 πŸ’–

okay bestie, quick vibe check: this is the Sisimai::RFC791 page from the User Contributed Perl Documentation, and it's literally just the IP-hunting part of Sisimai. no cap, she's tiny but she's mighty. ✨


🌸 NAME 🌸

Sisimai::RFC791 β€” the IP related class, periodt. πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

load her up and let her sniff out an IP like the main character she is:

use Sisimai::RFC791;

my $p = Sisimai::RFC791->find("mx7.example.jp:[192.0.2.27]"); # ["192.0.2.27"]

see that? in goes a messy string, out comes the IP. iconic. πŸ¦‹


🌈 DESCRIPTION 🌈

Sisimai::RFC791 is a class related to IP. that's it. that's the whole thing. she does IP stuff and she does it well, and honestly? obsessed. πŸ’œ


πŸ‘‘ CLASS METHODS πŸ‘‘

✨ is_ipv4address(String)

the is_ipv4address method returns 1 if the argument is a valid IPv4 address. it's giving gatekeeper, and honestly it should be, because there are a LOT of fake IPs out here. πŸ’€

print Sisimai::RFC791->is_ipv4address("192.0.2.25");   # 1
print Sisimai::RFC791->is_ipv4address("123.456.78.9"); # 0

192.0.2.25? valid, slay. 123.456.78.9? not valid, bestie, those octets are NOT it. 😭


πŸ¦‹ find(String)

the find method returns all the IPv4 addresses found in the given string. not just the first one β€” all of them. she's thorough like that. πŸ”₯

my $v = "connection refused from 192.0.2.1, DNSBL returned 127.0.0.2";
my $p = Sisimai::RFC791->find($v); # ["192.0.2.1", "127.0.0.2"]

two IPs walked into a string and she caught BOTH of them, no cap. the way she just finds them. 🫢


πŸ’– AUTHOR πŸ’–

azumakuniyuki β€” the legend, the icon, the moment. 🌟


Copyright (C) 2024,2026 azumakuniyuki, All rights reserved. πŸ’œ


πŸ“œ LICENSE πŸ“œ

This software is distributed under The BSD 2-Clause License. go forth and share, responsibly. πŸ’…


just a lil reminder bestie: every flag, path, number and example above is verbatim, so you can trust her with your actual code. iykyk. 🧚

and that's the whole page, fr fr. πŸ“ this beauty ships with perl v5.40.1 and was dated 2026-07-05, and yep β€” she's still Sisimai::RFC791(3pm) at the end of the day. mwah. πŸ’‹βœ¨

πŸ“¦ where this page comes from