Guigou has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monks,
I am very new to Perl coding. I want to achieve a simple taks which consists of getting starts and ends of sentences. All is stored in a file and looks like that :<Turn speaker="spk2" startTime="6.97" endTime="8.536">
I had a meeting with a specialist who gave me a Perl code that looks like this : C:\_DATA_Guillaume_Nassau>cat C1_A1_1a.trs | perl -ne "print \"$1 $2 $2\n\" if (/Turn.*speaker=(.*)\s+.*=(.*)\s+.*=(.*)/)" > toto.xxxThat would compile a file with all the information I need. But it won't work --> "semicolon seem to be missing at line 1" Anyone sees the problem ? This worked perfectly on this person's computer, he copied and pasted it in an email sent to me. I did install activeperl which he was using and now I get this error...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Help please?
by QM (Parson) on May 30, 2014 at 10:03 UTC | |
by Guigou (Initiate) on May 30, 2014 at 10:15 UTC | |
by QM (Parson) on May 30, 2014 at 10:19 UTC | |
by Guigou (Initiate) on May 30, 2014 at 10:30 UTC | |
by Anonymous Monk on May 30, 2014 at 10:46 UTC | |
by choroba (Cardinal) on May 30, 2014 at 10:18 UTC | |
|
Re: Help please?
by choroba (Cardinal) on May 30, 2014 at 09:49 UTC | |
by Guigou (Initiate) on May 30, 2014 at 09:54 UTC | |
by QM (Parson) on May 30, 2014 at 09:59 UTC | |
by Guigou (Initiate) on May 30, 2014 at 10:01 UTC | |
by QM (Parson) on May 30, 2014 at 10:08 UTC | |
by Jim (Curate) on May 30, 2014 at 17:08 UTC |