[ale] Fore (Was Re: [ale] Simple Perl Question)

James P. Kinney III jkinney at localnetsolutions.com
Mon Feb 25 12:02:44 EST 2002


Fletch,
You are clearly one of those people who have given perl the bad
reputation of being an illegible language!

On Mon, 2002-02-25 at 11:34, Fletch wrote:
> 
> [...]
> 
>     Bob> I am reading lines of data from a file and doing an extract
>     Bob> to go into a SQL database.  Fields are delimited by "|".
>     Bob> There are 12 fields per line.  I would like to read each
>     Bob> line into an array, and then export four of the fields.  So,
>     Bob> and extract could be:
> 
> perl -F\\\| -lane 'print q{insert into foo values ("},join(q{",}, at F[0,4,6,9]),qq{")\n}' ./52.txt | $YOUR_DB_PROG
> 
> -- 
> Fletch                | "If you find my answers frightening,       __`'/|
> fletch at phydeaux.org   |  Vincent, you should cease askin'          \ o.O'
> 770 933-0600 x211(w)  |  scary questions." -- Jules                =(___)=
>                       |                                               U
> 
> ---
> This message has been sent through the ALE general discussion list.
> See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
> sent to listmaster at ale dot org.
> 
-- 
James P. Kinney III   \Changing the mobile computing world/
President and COO      \          one Linux user         /
Local Net Solutions,LLC \           at a time.          /
770-493-8244             \.___________________________./

GPG ID: 829C6CA7 James P. Kinney III (M.S. Physics)
<jkinney at localnetsolutions.com>
Fingerprint = 3C9E 6366 54FC A3FE BA4D 0659 6190 ADC3 829C 6CA7 



 This is a digitally signed message part




More information about the Ale mailing list