Zary Necheva wrote:
>
> Hi everyone,
Hello,
> How can I extract the text before the first occurrence of dot (.) or
> single space from the first field.
>
> This is my file
>
> LB1571 5TH .W43 1993|text1|text1|
> FICT. V.12|text2|text2|
> FICT.|text3|text3|
> HQ806 .B35 1995|text4|text4|
> G53
Deb wrote:
>
> I need help understanding why I'm getting this complaint,
>
> Use of uninitialized value in concatenation (.) or string at test.pl line 2.
>
> It says its unitialized, but isn't the my $status initializing the scalar?
> I'm so confused.
>
> Here's the code:
>
>
> #!/usr/local/bin/per
ginal Message -
From: "Rob Dixon" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, December 31, 2003 9:57 AM
Subject: Re: Help with extracting text
> Zary Necheva wrote:
> >
> > How can I extract the text before the first occurrence of dot (.)
Zary Necheva wrote:
>
> How can I extract the text before the first occurrence of dot (.) or
> single space from the first field.
>
> This is my file
>
> LB1571 5TH .W43 1993|text1|text1|
> FICT. V.12|text2|text2|
> FICT.|text3|text3|
> HQ806 .B35 1995|text4|text4|
> G530.T6B4941988Q|text5|text5|
AIL PROTECTED]
Sent: 31 December 2003 14:33
To: [EMAIL PROTECTED]; Zary Necheva
Subject: RE:: Help with extracting text
Hi Zary,
I have attached a sample file with the data you offered and a perl script
which can be copied and pasted into the command line on win32.
Let me know if you have any p
Hi Zary,
I have attached a sample file with the data you offered and a perl script
which can be copied and pasted into the command line on win32.
Let me know if you have any problems.
HTH,
Will Martell
Dallas Texas
LB1571 5TH .W43 1993|text1|text1|
FICT. V.12|text2|text2|
FICT.|text3|text3|
HQ80
On Dec 30, 2003, at 1:35 PM, Zary Necheva wrote:
[..]
How can I extract the text before the first occurrence
of dot (.) or single space from the first field.
This is my file
LB1571 5TH .W43 1993|text1|text1|
FICT. V.12|text2|text2|
FICT.|text3|text3|
HQ806 .B35 1995|text4|text4|
G530.T6B4941988Q|
Zary Necheva wrote:
>
> Hi everyone,
Hello,
> I have a file with data similar to this
> ..
> Ex|FEx|NQxx|OUxx|GExx|OVxxx|IQ|OR
> Ex|FExx|NQxx|GExxx|OVxx|OUxx|IQxxx|ORxxx
> Ex|FExxx|NQxx|OUxx|OVxxx|ORx
Rob Dixon wrote:
>
> use strict;
> use warnings;
>
> open INFILE, 'myfile.txt' or die $!;
>
> while () {
> chomp;
> my @fields = split /\|/;
> my @output = grep /^(E|FE|NQ|IQ)/, @fields;
> print join('|', @output), "\n";
> }
>
> **OUTPUT
>
> Ex|FEx|NQxx|IQ
> Ex|FExxx
Hi Tim.
Sorry, but may I mess with your code? :)
Tim Johnson wrote:
>
> Zary Necheva wrote:
> >
> > I have a file with data similar to this
> > ..
> > Ex|FEx|NQxx|OUxx|GExx|OVxxx|IQ|OR
> > Ex|FExx|NQxx|GExxx|OVxx|OUxx|IQxxx|O
This is a pretty classic example of where split and join come in handy. Here I'm
reading each line, splitting it into fields by the pipe character, then creating a new
array with only those fields that begin with the letters I specify. Then I use join
to make a string with those fields I chos
From: Jeff 'japhy' Pinyan <[EMAIL PROTECTED]>
> On Feb 14, Bill Akins said:
>
> >I have a string that is read in and assigned to a veriable. String
> >looks something like this: 10.00 c$cpi c$ul (Sample Number:) c$sh
> >/Courier 0 c$fnt ( SA-01-0C8A8) c$sh ( ) c$sh /Courie
On Feb 14, Bill Akins said:
>I have a string that is read in and assigned to a veriable. String
>looks something like this:
>10.00 c$cpi c$ul (Sample Number:) c$sh /Courier 0 c$fnt (
>SA-01-0C8A8) c$sh ( ) c$sh /Courier 0 c$fnt
>
>I need the string between the second set of ()'s. There may
13 matches
Mail list logo