Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Make a line generic

by monaLisa (Initiate)
on Aug 11, 2003 at 10:57 UTC ( #282820=perlquestion: print w/replies, xml ) Need Help??
monaLisa has asked for the wisdom of the Perl Monks concerning the following question:

I want to text-line by a variable like this
my $endUnixLine = "otsort ../mydata/SKE_DE_WKey_out.dat ../mydata/SKE_ +DE_WKey_out.srt /apost s(1001,8,c,a) om(1001,1,c,EQ,' ') f(fix,1371) +core(60000)";
by
my $endUnixLine = /^otsort.*/;
What is the correct formulation?
Thanks,
Mona

Replies are listed 'Best First'.
Re: Make a line generic
by snadra (Scribe) on Aug 11, 2003 at 11:26 UTC
    Hello,

    I am sorry, but what do you mean by 'text-line'?
    Please be a bit more specific.
    It does not really help to open one thread after the other, which all seem to seek for the same result (or not?). I think it would be better to just use one thread and try to explain your problem more detailed.
    If you want to use a regular expression you need to write =~ instead of =
    # to figure out if a line matches write: if ($endUnixLine =~ /^otsort.*/) { print 'matches'; }
    That would match a line, wich has 'otsort' in the beginning followed by zero or more characters.

    snadra

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://282820]
Approved by Corion
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2018-07-20 22:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (441 votes). Check out past polls.

    Notices?