l Message-
From: Alex Demmler [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 06, 2003 6:07 PM
To: [EMAIL PROTECTED]
Subject: How to substract words
Hi folks!
I have a problem with pattern matching.
I want do find the difference between two words. I have tried, but donot get
it work. Any
With a minor correction: [or three or four--that was definitely posted in haste] so
that it runs:
#!/usr/bin/perl -w
use strict;
use warnings;
my $word1 = "Hello";
my $word2 = "Othello's World";
my $result = difference($word1, $word2);
print "$result\n";
sub difference {
my ($word1, $word2) =
Hi John,
Hmmm, I don't know about this handing ready-made code out, but--what the hell, the
harms been done, so I';ll join the party:
#!/usr/bin/perl -w
use strict;
use warnings;
my $word1 = "Hello";
my $word2 = HelloWorld;
sub difference {
my ($word1, $word2) = @_;
if ($word1 =~ /.*$word2.
Hi Alex,
Can you show or tell us what you have tried? We could also help more if yoiu tell us
a little about the subject matter you are covering in class.
Alex Demmler wrote:
> Hi folks!
>
> I have a problem with pattern matching.
> I want do find the difference between two words. I have tried
Alex Demmler wrote:
>
> Hi folks!
Hello,
> I have a problem with pattern matching.
> I want do find the difference between two words. I have tried, but donot get
> it work. Any tips?
>
> Example:
>
> 1. Word = helloRed
> 2. Word = hello
> ---
> Result = Red
my $word1 = 'hello
ld like to see a solution in terms of regex.
>
> Cheers
>
> Pavle
>
> - Original Message -
> From: "Alex Demmler" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, January 06, 2003 3:06 PM
> Subject: How to substract words
>
nt: Monday, January 06, 2003 3:06 PM
Subject: How to substract words
> Hi folks!
>
> I have a problem with pattern matching.
> I want do find the difference between two words. I have tried, but donot
get
> it work. Any tips?
>
> Example:
>
> 1. Word = helloRed
>
Hi folks!
I have a problem with pattern matching.
I want do find the difference between two words. I have tried, but donot get
it work. Any tips?
Example:
1. Word = helloRed
2. Word = hello
---
Result = Red
Thanks Alex
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For addition
Hi folks!
I have a problem with pattern matching.
I want do find the difference between two words. I have tried, but donot get
it work. Any tips?
Example:
1. Word = helloRed
2. Word = hello
---
Result = Red
Thanks Alex
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For addition