Hi
I have a really simple problem that I could solve easily with a strstr() call
in c but cannot get my head around in perl.
I have have the following input.
Active Accounted actions on tty57, User fred Priv 1
Task ID 35176, Network Accounting record, 02:04:00 Elapsed
what I want to do is
Kevin wrote:
Hi
I have a really simple problem that I could solve easily with a strstr() call
in c but cannot get my head around in perl.
I have have the following input.
Active Accounted actions on tty57, User fred Priv 1
Task ID 35176, Network Accounting record, 02:04:00 Elapsed
- Original Message -
From: Kevin [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, January 31, 2002 10:15 PM
Subject: Matching text
I have have the following input.
Active Accounted actions on tty57, User fred Priv 1
Task ID 35176, Network Accounting record, 02:04:00 Elapsed
I have read about this before but it hadn't clicked. That helps clear up a
lot of issues.
Thanks
something like
if ($data =~ /User ([^ ]*)/)
{
$username = $1;
}
what happends there is that it checks for the occurance of User then a
space followed by 0-* nonspace chars. it puts the
Lorne Easton wrote:
The following code:
SNIP
sub return_internal_links
{
foreach my $element (@links) {
my $all_internal = join(\n,@internal),\n;
if (($element =~ m/$startingurl/i) ($all_internal !~ m/$element/gi)) {
print $element,\n;
push
The following code:
SNIP
sub return_internal_links
{
foreach my $element (@links) {
my $all_internal = join(\n,@internal),\n;
if (($element =~ m/$startingurl/i) ($all_internal !~ m/$element/gi)) {
print $element,\n;
push (@internal, $element);
}
}
}
The following code:
SNIP
sub return_internal_links
{
foreach my $element (@links) {
my $all_internal = join(\n,@internal),\n;
if (($element =~ m/$startingurl/i) ($all_internal !~ m/$element/gi)) {
print $element,\n;
push (@internal, $element);
}
}
}