dear Perlmonks community! :)
i´m messed up with the expression, maybe someone can help me!
lets say i got following input line:
35.8.64.179 /pub/ l:ftpuser p:password port:21
($ip, $path) = ($details =~ m!^(\d+(?:\.\d+){3}) (/.*/)!);
this code gets the ip to $ip and the path behind it to $path.
i want to extend this code a little, but i´m messed up with the expresions :(
the expression needs to get - $ip, $path, $login, $password, $port - where the login is always behind 'l:' the pw behind 'p:' and the port behind 'port:' in the input line.
thanks for your help!
greets, p3rldud3
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.