s...@missionstclare.com wrote:
I'm running PERL under the MACOSX.
It is spelled Perl, not PERL. :-)
The line
$text=~s/george/tim/;
causes a global substituion of "george" with "tim"
How can I limit the substituion to the first instance only?
Global substitution only works if you use t
I'm running PERL under the MACOSX.
The line
$text=~s/george/tim/;
causes a global substituion of "george" with "tim"
How can I limit the substituion to the first instance only?
Thanks!
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...
Shlomi Fish wrote:
On Tue, 21 Feb 2012 23:47:39 +0400
Vyacheslav wrote:
I'm new in perl and have many questions.
This my first programm.
#!/usr/bin/perl
use strict;
use warnings;
That's good.
my $number = 0;
my $_ = 0;
You shouldn't use my with "$_" and you should avoid using $_ in
Gentlemen, you're both running towards the line marked "on topic for
perl-beginners" at a rapid pace. I urge you to consider further messages in
this thread carefully, lest that line be crossed.
thanks,
the list mom.
--
John SJ Anderson / geneh...@genehack.org
Hello Rob,
On Tue, 21 Feb 2012 20:32:19 +
Rob Dixon wrote:
> On 21/02/2012 19:57, Shlomi Fish wrote:
> > Hi,
> >
> > On Tue, 21 Feb 2012 23:47:39 +0400
> > Vyacheslav wrote:
> >
> >> Hello.
> >>
> >> I'm new in perl and have many questions.
> >>
> >> This my first programm.
> >>
> >> #!/usr
On 21/02/2012 19:57, Shlomi Fish wrote:
Hi,
On Tue, 21 Feb 2012 23:47:39 +0400
Vyacheslav wrote:
Hello.
I'm new in perl and have many questions.
This my first programm.
#!/usr/bin/perl
use strict;
use warnings;
That's good.
my $number = 0;
my $_ = 0;
You shouldn't use my with "$_"
On 21/02/2012 19:47, Vyacheslav wrote:
Hello.
I'm new in perl and have many questions.
This my first programm.
#!/usr/bin/perl
use strict;
use warnings;
my $number = 0;
my $_ = 0;
print "Enter number:";
chomp($number = <>);
if ( $number = /[0-9]/) {
print "you number $number\n"
}
./firsh.pl
On 02/21/2012 01:47 PM, Vyacheslav wrote:
Hello.
I'm new in perl and have many questions.
This my first programm.
#!/usr/bin/perl
use strict;
use warnings;
EXCELLENT START!
my $number = 0;
my $_ = 0;
print "Enter number:";
chomp($number = <>);
if ( $number = /[0-9]/) {
You want the matc
Hi,
On Tue, 21 Feb 2012 23:47:39 +0400
Vyacheslav wrote:
> Hello.
>
> I'm new in perl and have many questions.
>
> This my first programm.
>
> #!/usr/bin/perl
>
> use strict;
> use warnings;
>
That's good.
> my $number = 0;
> my $_ = 0;
You shouldn't use my with "$_" and you should avoid
Hello.
I'm new in perl and have many questions.
This my first programm.
#!/usr/bin/perl
use strict;
use warnings;
my $number = 0;
my $_ = 0;
print "Enter number:";
chomp($number = <>);
if ( $number = /[0-9]/) {
print "you number $number\n"
}
./firsh.pl
Enter number: 23
I thought, what print
On 12-02-21 11:37 AM, Adams Paul wrote:
Sent from my LG phone
Is this is what is called a bum dial?
--
Just my 0.0002 million dollars worth,
Shawn
Programming is as much about organization and communication
as it is about coding.
It's Mutual Aid, not fierce competition, that's the dom
Sent from my LG phone
"John W. Krahn" wrote:
>Chris Stinemetz wrote:
>> I am trying ot find a way to use an array as a reference to remove
>> lines from a file.
>> The array @keyFields has the elements "rcsm and cdmno". My objective
>> is to remove any line from the input that matches the regex
Hi
Igor,
Any time you have suggestions on improving my code. Please comment. I am always
trying to improve.
Thanks for the tip I will try it out. It has been over 7 years since I have
done any real serious programming. So I am very rusty. I had written a program
in C from memory which got th
13 matches
Mail list logo