Page is a not externally linkable
- Code, Content, and Presentation
-- Perl Server Side CGI Scripting
---- Perl script to return a specific line of a file?


Romeo - 11:27 pm on Jan 18, 2004 (gmt 0)


... hmm, you really should get that camel-book ...

You may insert a simple regexp substitution (drop anything up to the first whitespace) as follows:
while(<INPUT>) {
if (/$pattern/) {
s/.*?\s//;
print;

HTH and regards,
R.


Thread source:: http://www.webmasterworld.com/perl/3424.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com