Re: substr (help,help,help);

2001-06-28 Thread Craig S Monroe
[EMAIL PROTECTED]> To: "Craig S Monroe" <[EMAIL PROTECTED]>; "Beginners@Perl (E-mail)" <[EMAIL PROTECTED]> Sent: Wednesday, June 27, 2001 5:45 PM Subject: Re: substr (help,help,help); > > while (){ > > if (m/\/nic\/login/){ > > this just say

Re: substr (help,help,help);

2001-06-27 Thread Michael Fowler
On Wed, Jun 27, 2001 at 05:30:11PM -0400, Craig S Monroe wrote: > open (SOURCE, "< $filename"); > > while (){ > if (m/\/nic\/login/){ > substr ($_,28,4); > print; > } > } That substr is a no-op, meaning it does nothing. If warnings had been turned on, you would have seen something along the

Re: substr (help,help,help);

2001-06-27 Thread Me
> while (){ > if (m/\/nic\/login/){ this just says yes or no, you have a match or you don't. m// (and friends like s///) can do more than that for you. for one thing, they can grab a particular piece of what they match. > substr ($_,28,4); what substr normally does -- get or change a piece of

substr (help,help,help);

2001-06-27 Thread Craig S Monroe
Hello, I am trying to pull a piece of text out of some html source. I am using the following, but the result is confusing me. open (SOURCE, "< $filename"); while (){ if (m/\/nic\/login/){ substr ($_,28,4); print; } } The result is : (Login) I would like to