Re: Using Substr and Regular expressions.
- From: "Dan Mercer" <damercer@xxxxxxxxxxx>
- Date: Fri, 23 Feb 2007 17:24:15 -0600
<kent.westmoreland@xxxxxxxxx> wrote in message news:1172263881.680949.20480@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
: On Feb 23, 10:21 am, "Dan Mercer" <damer...@xxxxxxxxxxx> wrote:
:
: > My guess is that if you have to ask this question, you're not ready
: > to program in perl yet. A number of solutions are available:
: >
: > use strict;
: > use warnings;
: > my $num;
: > my $name;
: > ($num,$name) = (split /_/,$ARGV[0])[1,2];
: >
: > is just one of many possibilities.
: >
: > Dan Mercer
: >
:
: Dan,
:
: Your blunt response "My guess is that if you have to ask this
: question, you're not ready to program in perl yet." is not far from
: the truth.
:
: I only recently started to "learn" perl ( 2 days ago). I am modifying
: a script that was given to me to preform a specific task. I wanted to
: make the script easier to use but I was not having much luck with the
: tutorials I found on the web. I figured posting here was a great
: place to find information that I required.
:
: I have tried both Manish and your suggestions ( both of which work
: fine) with a few modifications.
:
: Some of my main holdbacks on perl where syntactical ( I actually had
: something similar to your version using the split function but only
: one variable).
:
: Anyway, thanks to everyone for all of your examples and help! Now I
: have a lot of things to research.
: Kent
Try SAMS "Teach Yourself Perl in 24 hours" (Clinton Pierce). Worked
for me.
Dan Mercer
:
:
:
:
.
- Follow-Ups:
- Re: Using Substr and Regular expressions.
- From: kent.westmoreland@xxxxxxxxx
- Re: Using Substr and Regular expressions.
- References:
- Using Substr and Regular expressions.
- From: kent.westmoreland@xxxxxxxxx
- Re: Using Substr and Regular expressions.
- From: Dan Mercer
- Re: Using Substr and Regular expressions.
- From: kent.westmoreland@xxxxxxxxx
- Using Substr and Regular expressions.
- Prev by Date: Re: How to boost performance of my crude script?
- Next by Date: Re: How to boost performance of my crude script?
- Previous by thread: Re: Using Substr and Regular expressions.
- Next by thread: Re: Using Substr and Regular expressions.
- Index(es):
Relevant Pages
|