in reply to Re: reading from file
in thread reading from file

Hi Thanks a lot Bruceb3
Can you explain the what this line exactly this does. /^(.+) (<.+>) (\(.+\)) (.+) (.+)$/;
and i'dont want to include braces around the name(I want it to be (aanis Anis Ahmed A 2007/10/04)) and also it should take only if the first column is a word and exclude if it is an digit.
These should be excluded. 000-01 <000-01@BONNIEB> (000-01) accessed 2007/08/21
Thanks a lot once again. Regards Johny

Replies are listed 'Best First'.
Re^3: reading from file
by mwah (Hermit) on Oct 10, 2007 at 08:03 UTC
    for unix shell:
    perl -lane 's/[)(]//g for @F; print"@F[0,2..$#F-2,$#F]" unless /^\d/' + input
    for win cmd shell:
    perl -lane "s/[)(]//g for @F; print qq{@F[0,2..$#F-2,$#F]} unless /^\ +d/" input
    Regards

    mwa
Re^3: reading from file
by Gangabass (Vicar) on Oct 10, 2007 at 08:06 UTC

    When you must use this pattern:

    /^(\w+) <(.+)> (\(.+\)) (.+) (.+)$/;