[ale] Perl Question
Dylan Northrup
docx at io.com
Wed Feb 7 20:49:05 EST 2007
[~] [01:48:19] docx> cat bar.pl
#!/usr/bin/perl
$a = 'java.xyz';
$b = 'java';
$c = $a;
$c =~ s/$b//;
print "$c\n";
[~] [01:48:22] docx> ./bar.pl
.xyz
[~] [01:48:26] docx>
Hope this helps.
A long time ago, (07.02.07), in a galaxy far, far away, Terry Bailey wrote:
:=Hi;
:=
:=The following is relative to a Perl script.
:=
:=$a contains the following string without a new line appended
:=
:=java.xyz
:=
:=
:=$b contains the following string without a new line appended
:=
:=java
:=
:=Using $a and $b, what is the easiest way to have $c contain
:=
:=.xyz
:=
:=
:=Thanks,
:=
:=Terry Bailey
:=
:=_______________________________________________
:=Ale mailing list
:=Ale at ale.org
:=http://www.ale.org/mailman/listinfo/ale
:=
--
Dylan Northrup - docx at io.com - http://www.io.com/~docx/
"Harder to work, harder to strive, hard to be glad to be alive, but it's
really worth it if you give it a try." -- Cowboy Mouth, 'Easy'
More information about the Ale
mailing list