Hi list

I was hoping someone would be so kind as to help me with this.

I have a CSV file and on every line, I have a line like so:

lts.dat|somedata
lts001.dat|somemoredata

I basically would like to ONLY get the name of the file before the first pipe.

I was thinking that the regex would look something like so

/^*\|/  # Get the beginning of the CSV file, extract the filename, to   
        #the first pipe

but I need to extract and pass the value to a variable.

Would anyone have any tips or advise on this.

Kind Regards
Brent Clark

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to