From matt.croft at bridgeporth.com Mon Nov 5 06:13:03 2012 From: matt.croft at bridgeporth.com (Matt Croft) Date: Mon, 5 Nov 2012 14:13:03 +0000 Subject: adding a filename into a data file Message-ID: <544B5936ED7F3A49B71AE05B11C478188D762A@AM2PRD0710MB351.eurprd07.prod.outlook.com> Hello, We have several text files with different file names and we want to combine them and have the file names appear in the resulting combined file at the start of every record. Is this possible in perl? We would want the output file to contain the file name plus the original data i.e. Original data file looks like this: 123456789 123456789 123456789 123456789 We want it to look like: file001 123456789 file001 123456789 file001 123456789 file001 123456789 Where the file name is file001.txt. Thanks and regards Matt Croft matt.croft at bridgeporth.com www.bridgeporth.com [Description: Description: Description: Description: Description: C:\BridgePorth\Templates\Logos\Bridgeporth Logo on Black (2).jpg] The information in this message is confidential and intended for the addressee only. If you have received this message in error please delete and notify the sender, any other action may be unlawful. The views expressed in this message are personal and not necessarily those of Bridgeporth Ltd. unless explicitly stated. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 2606 bytes Desc: image001.jpg URL: From benjamin.martin at twentyci.co.uk Mon Nov 5 06:33:11 2012 From: benjamin.martin at twentyci.co.uk (Benjamin Martin) Date: Mon, 5 Nov 2012 14:33:11 +0000 Subject: adding a filename into a data file In-Reply-To: <544B5936ED7F3A49B71AE05B11C478188D762A@AM2PRD0710MB351.eurprd07.prod.outlook.com> References: <544B5936ED7F3A49B71AE05B11C478188D762A@AM2PRD0710MB351.eurprd07.prod.outlook.com> Message-ID: <5097CE27.9010905@twentyci.co.uk> On 05/11/12 14:13, Matt Croft wrote: > Is this possible in perl? Something like this: #!/usr/bin/env perl use strict; use warnings; use autodie; my $base_dir = "/home/person"; # as base dir to read/write file to/from my @files = qw/file1.txt file2.txt/; # the files to read and combine open $new_fh, ">", "$base_dir/NEWFILE.txt"; # open the master file to receive all files content foreach my $f (@files) { my $fh open $fh, "<", "$base_dir/$f"; while(<$fh>) { print $new_fh "$f $_"; } close $fh; } close $fh2; This email, its content and any files transmitted with it are intended solely for the addressee(s) and may be legally privileged and/or confidential. If you are not the intended recipient, you may not divulge any of its contents to anyone and should delete the email and contact the sender on the telephone number shown above or via return email. Messages sent via this medium may be subject to delays, non-delivery and unauthorised alteration. This email has been prepared using information believed by the author to be reliable and accurate, but neither TwentyCi Limited, nor any of its subsidiaries or associates makes any warranty as to its accuracy or completeness. Any opinions or recommendations expressed herein are solely those of the author. TwentyCi Limited is a company registered in England, No.06943607. The registered office address is: 6 Whittle Court Knowlhill Milton Keynes MK5 8FT From Tony.Edwardson at lchclearnet.com Mon Nov 5 06:37:16 2012 From: Tony.Edwardson at lchclearnet.com (Tony Edwardson) Date: Mon, 5 Nov 2012 14:37:16 +0000 Subject: adding a filename into a data file In-Reply-To: <5097CE27.9010905@twentyci.co.uk> References: <544B5936ED7F3A49B71AE05B11C478188D762A@AM2PRD0710MB351.eurprd07.prod.outlook.com> <5097CE27.9010905@twentyci.co.uk> Message-ID: <8FC4575E52D65D469A9511598C6843F0CAF2B3CC86@EXCPR2.corp.lch.com> or just while (<>) { print "$ARGV $_"; } -----Original Message----- From: MiltonKeynes-pm [mailto:miltonkeynes-pm-bounces+tony.edwardson=lchclearnet.com at pm.org] On Behalf Of Benjamin Martin Sent: 05 November 2012 14:33 To: miltonkeynes-pm at pm.org Subject: Re: adding a filename into a data file On 05/11/12 14:13, Matt Croft wrote: > Is this possible in perl? Something like this: #!/usr/bin/env perl use strict; use warnings; use autodie; my $base_dir = "/home/person"; # as base dir to read/write file to/from my @files = qw/file1.txt file2.txt/; # the files to read and combine open $new_fh, ">", "$base_dir/NEWFILE.txt"; # open the master file to receive all files content foreach my $f (@files) { my $fh open $fh, "<", "$base_dir/$f"; while(<$fh>) { print $new_fh "$f $_"; } close $fh; } close $fh2; This email, its content and any files transmitted with it are intended solely for the addressee(s) and may be legally privileged and/or confidential. If you are not the intended recipient, you may not divulge any of its contents to anyone and should delete the email and contact the sender on the telephone number shown above or via return email. Messages sent via this medium may be subject to delays, non-delivery and unauthorised alteration. This email has been prepared using information believed by the author to be reliable and accurate, but neither TwentyCi Limited, nor any of its subsidiaries or associates makes any warranty as to its accuracy or completeness. Any opinions or recommendations expressed herein are solely those of the author. TwentyCi Limited is a company registered in England, No.06943607. The registered office address is: 6 Whittle Court Knowlhill Milton Keynes MK5 8FT _______________________________________________ MiltonKeynes-pm mailing list MiltonKeynes-pm at pm.org http://mail.pm.org/mailman/listinfo/miltonkeynes-pm A copy of the LCH.Clearnet e-mail disclaimer can be found at: www.lchclearnet.com/disclaimer/email ? LCH.Clearnet Limited, Registered Office: Aldgate House, 33 Aldgate High Street, London EC3N 1EA. Recognised as a Clearing House under the Financial Services & Markets Act 2000. Reg in England No.25932. LCH.Clearnet SA, Si?ge Social, 18 rue du Quatre Septembre, 75002 Paris, Chambre de Compensation conform?ment au Code Mon?taire et Financier. From hugh at hcgallagher.co.uk Mon Nov 5 07:05:47 2012 From: hugh at hcgallagher.co.uk (Hugh Gallagher) Date: Mon, 5 Nov 2012 15:05:47 +0000 Subject: adding a filename into a data file In-Reply-To: <8FC4575E52D65D469A9511598C6843F0CAF2B3CC86@EXCPR2.corp.lch.com> References: <544B5936ED7F3A49B71AE05B11C478188D762A@AM2PRD0710MB351.eurprd07.prod.outlook.com> <5097CE27.9010905@twentyci.co.uk> <8FC4575E52D65D469A9511598C6843F0CAF2B3CC86@EXCPR2.corp.lch.com> Message-ID: Just for fun, I did it with some abuse of the default grep output and a bit of sed. grep '.' * | sed 's/^\([^.]*\)\.[a-z]*:/\1 /' On 5 November 2012 14:37, Tony Edwardson wrote: > or just > while (<>) { > print "$ARGV $_"; > } > > -----Original Message----- > From: MiltonKeynes-pm [mailto:miltonkeynes-pm-bounces+tony.edwardson= > lchclearnet.com at pm.org] On Behalf Of Benjamin Martin > Sent: 05 November 2012 14:33 > To: miltonkeynes-pm at pm.org > Subject: Re: adding a filename into a data file > > On 05/11/12 14:13, Matt Croft wrote: > > Is this possible in perl? > > Something like this: > > #!/usr/bin/env perl > > use strict; > use warnings; > use autodie; > > my $base_dir = "/home/person"; # as base dir to read/write file to/from > my @files = qw/file1.txt file2.txt/; # the files to read and combine > > open $new_fh, ">", "$base_dir/NEWFILE.txt"; # open the master file to > receive all files content > foreach my $f (@files) { > > my $fh > open $fh, "<", "$base_dir/$f"; > while(<$fh>) { > print $new_fh "$f $_"; > } > close $fh; > > } > close $fh2; > > > This email, its content and any files transmitted with it are intended > solely for the addressee(s) and may be legally privileged and/or > confidential. If you are not the intended recipient, you may not divulge > any of its contents to anyone and should delete the email and contact the > sender on the telephone number shown above or via return email. Messages > sent via this medium may be subject to delays, non-delivery and > unauthorised alteration. This email has been prepared using information > believed by the author to be reliable and accurate, but neither TwentyCi > Limited, nor any of its subsidiaries or associates makes any warranty as to > its accuracy or completeness. Any opinions or recommendations expressed > herein are solely those of the author. TwentyCi Limited is a company > registered in England, No.06943607. The registered office address is: 6 > Whittle Court Knowlhill Milton Keynes MK5 8FT > _______________________________________________ > MiltonKeynes-pm mailing list > MiltonKeynes-pm at pm.org > http://mail.pm.org/mailman/listinfo/miltonkeynes-pm > > > A copy of the LCH.Clearnet e-mail disclaimer can be found at: > www.lchclearnet.com/disclaimer/email > > LCH.Clearnet Limited, Registered Office: Aldgate House, 33 Aldgate High > Street, London EC3N 1EA. > Recognised as a Clearing House under the Financial Services & Markets Act > 2000. Reg in England No.25932. > LCH.Clearnet SA, Si?ge Social, 18 rue du Quatre Septembre, 75002 Paris, > Chambre de Compensation conform?ment au Code Mon?taire et Financier. > _______________________________________________ > MiltonKeynes-pm mailing list > MiltonKeynes-pm at pm.org > http://mail.pm.org/mailman/listinfo/miltonkeynes-pm > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Tony.Edwardson at lchclearnet.com Mon Nov 5 07:10:24 2012 From: Tony.Edwardson at lchclearnet.com (Tony Edwardson) Date: Mon, 5 Nov 2012 15:10:24 +0000 Subject: adding a filename into a data file In-Reply-To: References: <544B5936ED7F3A49B71AE05B11C478188D762A@AM2PRD0710MB351.eurprd07.prod.outlook.com> <5097CE27.9010905@twentyci.co.uk> <8FC4575E52D65D469A9511598C6843F0CAF2B3CC86@EXCPR2.corp.lch.com> Message-ID: <8FC4575E52D65D469A9511598C6843F0CAF2B3CC87@EXCPR2.corp.lch.com> TIMTOWTDI From: MiltonKeynes-pm [mailto:miltonkeynes-pm-bounces+tony.edwardson=lchclearnet.com at pm.org] On Behalf Of Hugh Gallagher Sent: 05 November 2012 15:06 To: miltonkeynes-pm at pm.org Subject: Re: adding a filename into a data file Just for fun, I did it with some abuse of the default grep output and a bit of sed. grep '.' * | sed 's/^\([^.]*\)\.[a-z]*:/\1 /' On 5 November 2012 14:37, Tony Edwardson > wrote: or just while (<>) { print "$ARGV $_"; } -----Original Message----- From: MiltonKeynes-pm [mailto:miltonkeynes-pm-bounces+tony.edwardson=lchclearnet.com at pm.org] On Behalf Of Benjamin Martin Sent: 05 November 2012 14:33 To: miltonkeynes-pm at pm.org Subject: Re: adding a filename into a data file On 05/11/12 14:13, Matt Croft wrote: > Is this possible in perl? Something like this: #!/usr/bin/env perl use strict; use warnings; use autodie; my $base_dir = "/home/person"; # as base dir to read/write file to/from my @files = qw/file1.txt file2.txt/; # the files to read and combine open $new_fh, ">", "$base_dir/NEWFILE.txt"; # open the master file to receive all files content foreach my $f (@files) { my $fh open $fh, "<", "$base_dir/$f"; while(<$fh>) { print $new_fh "$f $_"; } close $fh; } close $fh2; This email, its content and any files transmitted with it are intended solely for the addressee(s) and may be legally privileged and/or confidential. If you are not the intended recipient, you may not divulge any of its contents to anyone and should delete the email and contact the sender on the telephone number shown above or via return email. Messages sent via this medium may be subject to delays, non-delivery and unauthorised alteration. This email has been prepared using information believed by the author to be reliable and accurate, but neither TwentyCi Limited, nor any of its subsidiaries or associates makes any warranty as to its accuracy or completeness. Any opinions or recommendations expressed herein are solely those of the author. TwentyCi Limited is a company registered in England, No.06943607. The registered office address is: 6 Whittle Court Knowlhill Milton Keynes MK5 8FT _______________________________________________ MiltonKeynes-pm mailing list MiltonKeynes-pm at pm.org http://mail.pm.org/mailman/listinfo/miltonkeynes-pm A copy of the LCH.Clearnet e-mail disclaimer can be found at: www.lchclearnet.com/disclaimer/email LCH.Clearnet Limited, Registered Office: Aldgate House, 33 Aldgate High Street, London EC3N 1EA. Recognised as a Clearing House under the Financial Services & Markets Act 2000. Reg in England No.25932. LCH.Clearnet SA, Si?ge Social, 18 rue du Quatre Septembre, 75002 Paris, Chambre de Compensation conform?ment au Code Mon?taire et Financier. _______________________________________________ MiltonKeynes-pm mailing list MiltonKeynes-pm at pm.org http://mail.pm.org/mailman/listinfo/miltonkeynes-pm -------------- next part -------------- An HTML attachment was scrubbed... URL: From i.a.cameron at open.ac.uk Mon Nov 5 07:31:18 2012 From: i.a.cameron at open.ac.uk (Ian Cameron) Date: Mon, 05 Nov 2012 15:31:18 +0000 Subject: adding a filename into a data file In-Reply-To: <8FC4575E52D65D469A9511598C6843F0CAF2B3CC87@EXCPR2.corp.lch.com> References: <544B5936ED7F3A49B71AE05B11C478188D762A@AM2PRD0710MB351.eurprd07.prod.outlook.com> <5097CE27.9010905@twentyci.co.uk> <8FC4575E52D65D469A9511598C6843F0CAF2B3CC86@EXCPR2.corp.lch.com> <8FC4575E52D65D469A9511598C6843F0CAF2B3CC87@EXCPR2.corp.lch.com> Message-ID: Tony Edwardson said: > TIMTOWTDI Yep! awk '{ print FILENAME " " $0 }' myinputfile.txt -- Cheers, Ian. The Open University is incorporated by Royal Charter (RC 000391), an exempt charity in England & Wales and a charity registered in Scotland (SC 038302). From ant at badmagic.com Mon Nov 5 07:32:11 2012 From: ant at badmagic.com (Ant Mitchell) Date: Mon, 5 Nov 2012 15:32:11 +0000 Subject: adding a filename into a data file In-Reply-To: References: <544B5936ED7F3A49B71AE05B11C478188D762A@AM2PRD0710MB351.eurprd07.prod.outlook.com> <5097CE27.9010905@twentyci.co.uk> <8FC4575E52D65D469A9511598C6843F0CAF2B3CC86@EXCPR2.corp.lch.com> Message-ID: <852AD1D3-906A-4C2F-AA0A-778E2B9FEE39@badmagic.com> On 5 Nov 2012, at 15:05, Hugh Gallagher wrote: > Just for fun, I did it with some abuse of the default grep output and a bit of sed. > > grep '.' * | sed 's/^\([^.]*\)\.[a-z]*:/\1 /' Just for fun, this may not do what you think it does. For example just use one file, you won't get the output you want, or use files that don't have a three letter extension, or file that is named "a:bcd:xxx" etc. The original question was fairly generic granted, but its not a general purpose solution. > > On 5 November 2012 14:37, Tony Edwardson wrote: > or just > while (<>) { > print "$ARGV $_"; > } or even: perl -npe 'print "$ARGV "' * Gotta love more than one way ! -- Ant -------------- next part -------------- An HTML attachment was scrubbed... URL: From tom at eborcom.com Mon Nov 5 08:00:53 2012 From: tom at eborcom.com (Tom Hukins) Date: Mon, 5 Nov 2012 16:00:53 +0000 Subject: adding a filename into a data file In-Reply-To: <852AD1D3-906A-4C2F-AA0A-778E2B9FEE39@badmagic.com> References: <544B5936ED7F3A49B71AE05B11C478188D762A@AM2PRD0710MB351.eurprd07.prod.outlook.com> <5097CE27.9010905@twentyci.co.uk> <8FC4575E52D65D469A9511598C6843F0CAF2B3CC86@EXCPR2.corp.lch.com> <852AD1D3-906A-4C2F-AA0A-778E2B9FEE39@badmagic.com> Message-ID: <20121105160053.GW96538@eborcom.com> On Mon, Nov 05, 2012 at 03:32:11PM +0000, Ant Mitchell wrote: > perl -npe 'print "$ARGV "' * Indeed. In the spirit of "teach a man to fish", it's worth mentioning that Perl mentions the "-npe" switches in its "perlrun" documentation and the "$ARGV" variable in "perlvar". You should find this documentation installed alongside perl, although some Linux distributions like to cripple their installations and omit it. You can also find it on the Web at http://perldoc.perl.org/. Tom From Tony.Edwardson at lchclearnet.com Mon Nov 5 08:10:08 2012 From: Tony.Edwardson at lchclearnet.com (Tony Edwardson) Date: Mon, 5 Nov 2012 16:10:08 +0000 Subject: adding a filename into a data file In-Reply-To: <20121105160053.GW96538@eborcom.com> References: <544B5936ED7F3A49B71AE05B11C478188D762A@AM2PRD0710MB351.eurprd07.prod.outlook.com> <5097CE27.9010905@twentyci.co.uk> <8FC4575E52D65D469A9511598C6843F0CAF2B3CC86@EXCPR2.corp.lch.com> <852AD1D3-906A-4C2F-AA0A-778E2B9FEE39@badmagic.com> <20121105160053.GW96538@eborcom.com> Message-ID: <8FC4575E52D65D469A9511598C6843F0CAF2B3CC8A@EXCPR2.corp.lch.com> I have a pdf explaining loads of perl one-liners if anyone is interested -----Original Message----- From: MiltonKeynes-pm [mailto:miltonkeynes-pm-bounces+tony.edwardson=lchclearnet.com at pm.org] On Behalf Of Tom Hukins Sent: 05 November 2012 16:01 To: miltonkeynes-pm at pm.org Subject: Re: adding a filename into a data file On Mon, Nov 05, 2012 at 03:32:11PM +0000, Ant Mitchell wrote: > perl -npe 'print "$ARGV "' * Indeed. In the spirit of "teach a man to fish", it's worth mentioning that Perl mentions the "-npe" switches in its "perlrun" documentation and the "$ARGV" variable in "perlvar". You should find this documentation installed alongside perl, although some Linux distributions like to cripple their installations and omit it. You can also find it on the Web at http://perldoc.perl.org/. Tom _______________________________________________ MiltonKeynes-pm mailing list MiltonKeynes-pm at pm.org http://mail.pm.org/mailman/listinfo/miltonkeynes-pm A copy of the LCH.Clearnet e-mail disclaimer can be found at: www.lchclearnet.com/disclaimer/email ? LCH.Clearnet Limited, Registered Office: Aldgate House, 33 Aldgate High Street, London EC3N 1EA. Recognised as a Clearing House under the Financial Services & Markets Act 2000. Reg in England No.25932. LCH.Clearnet SA, Si?ge Social, 18 rue du Quatre Septembre, 75002 Paris, Chambre de Compensation conform?ment au Code Mon?taire et Financier. From hugh at hcgallagher.co.uk Mon Nov 5 08:10:34 2012 From: hugh at hcgallagher.co.uk (Hugh Gallagher) Date: Mon, 5 Nov 2012 16:10:34 +0000 Subject: adding a filename into a data file In-Reply-To: <20121105160053.GW96538@eborcom.com> References: <544B5936ED7F3A49B71AE05B11C478188D762A@AM2PRD0710MB351.eurprd07.prod.outlook.com> <5097CE27.9010905@twentyci.co.uk> <8FC4575E52D65D469A9511598C6843F0CAF2B3CC86@EXCPR2.corp.lch.com> <852AD1D3-906A-4C2F-AA0A-778E2B9FEE39@badmagic.com> <20121105160053.GW96538@eborcom.com> Message-ID: > perl -npe 'print "$ARGV "' * That's very neat. Am I wrong to say that the -n is superfluous because of the -p? Just need to add stripping of the file extension and job done. On 5 November 2012 16:00, Tom Hukins wrote: > On Mon, Nov 05, 2012 at 03:32:11PM +0000, Ant Mitchell wrote: > > perl -npe 'print "$ARGV "' * > > Indeed. In the spirit of "teach a man to fish", it's worth mentioning > that Perl mentions the "-npe" switches in its "perlrun" documentation > and the "$ARGV" variable in "perlvar". > > You should find this documentation installed alongside perl, although > some Linux distributions like to cripple their installations and omit > it. You can also find it on the Web at http://perldoc.perl.org/. > > Tom > _______________________________________________ > MiltonKeynes-pm mailing list > MiltonKeynes-pm at pm.org > http://mail.pm.org/mailman/listinfo/miltonkeynes-pm > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Tony.Edwardson at lchclearnet.com Mon Nov 5 08:14:41 2012 From: Tony.Edwardson at lchclearnet.com (Tony Edwardson) Date: Mon, 5 Nov 2012 16:14:41 +0000 Subject: adding a filename into a data file In-Reply-To: References: <544B5936ED7F3A49B71AE05B11C478188D762A@AM2PRD0710MB351.eurprd07.prod.outlook.com> <5097CE27.9010905@twentyci.co.uk> <8FC4575E52D65D469A9511598C6843F0CAF2B3CC86@EXCPR2.corp.lch.com> <852AD1D3-906A-4C2F-AA0A-778E2B9FEE39@badmagic.com> <20121105160053.GW96538@eborcom.com> Message-ID: <8FC4575E52D65D469A9511598C6843F0CAF2B3CC8B@EXCPR2.corp.lch.com> yes ? you use ?n with print or ?p without print perl ?pe ?$_ = ?$ARGV $_?? From: MiltonKeynes-pm [mailto:miltonkeynes-pm-bounces+tony.edwardson=lchclearnet.com at pm.org] On Behalf Of Hugh Gallagher Sent: 05 November 2012 16:11 Cc: miltonkeynes-pm at pm.org Subject: Re: adding a filename into a data file > perl -npe 'print "$ARGV "' * That's very neat. Am I wrong to say that the -n is superfluous because of the -p? Just need to add stripping of the file extension and job done. On 5 November 2012 16:00, Tom Hukins > wrote: On Mon, Nov 05, 2012 at 03:32:11PM +0000, Ant Mitchell wrote: > perl -npe 'print "$ARGV "' * Indeed. In the spirit of "teach a man to fish", it's worth mentioning that Perl mentions the "-npe" switches in its "perlrun" documentation and the "$ARGV" variable in "perlvar". You should find this documentation installed alongside perl, although some Linux distributions like to cripple their installations and omit it. You can also find it on the Web at http://perldoc.perl.org/. Tom _______________________________________________ MiltonKeynes-pm mailing list MiltonKeynes-pm at pm.org http://mail.pm.org/mailman/listinfo/miltonkeynes-pm A copy of the LCH.Clearnet e-mail disclaimer can be found at: www.lchclearnet.com/disclaimer/email ? LCH.Clearnet Limited, Registered Office: Aldgate House, 33 Aldgate High Street, London EC3N 1EA. Recognised as a Clearing House under the Financial Services & Markets Act 2000. Reg in England No.25932. LCH.Clearnet SA, Si?ge Social, 18 rue du Quatre Septembre, 75002 Paris, Chambre de Compensation conform?ment au Code Mon?taire et Financier. -------------- next part -------------- An HTML attachment was scrubbed... URL: From andyfrommk at gmail.com Tue Nov 6 14:04:48 2012 From: andyfrommk at gmail.com (Andy Selby) Date: Tue, 6 Nov 2012 22:04:48 +0000 Subject: Meeting: Tuesday 13th of November Message-ID: The Perl Mongers is less than a week away As ever, it will be held at the Wetherspoons pub, near the NetworkRail building (not the one in the Xscape), opposite the Pinnacle:MK http://osm.org/go/eu4qJDHoE-- Starting from 7pm, and going on till the last people stumble off home. We usually inhabit one of the two large tables infront of the curved benches in front of the bar. Feel free to bring your $perl_running_device along if you want a hand/to show off -------------- next part -------------- An HTML attachment was scrubbed... URL: From andyfrommk at gmail.com Tue Nov 13 09:39:16 2012 From: andyfrommk at gmail.com (Andy Selby) Date: Tue, 13 Nov 2012 17:39:16 +0000 Subject: Meeting: Tuesday 13th of November In-Reply-To: References: Message-ID: Just to remind every, This is tonight On 6 November 2012 22:04, Andy Selby wrote: > The Perl Mongers is less than a week away > > As ever, it will be held at the Wetherspoons pub, near the NetworkRail > building (not the one in the Xscape), opposite the Pinnacle:MK > > http://osm.org/go/eu4qJDHoE-- > > Starting from 7pm, and going on till the last people stumble off home. > We usually inhabit one of the two large tables infront of the curved > benches in front of the bar. > Feel free to bring your $perl_running_device along if you want a > hand/to show off -------------- next part -------------- An HTML attachment was scrubbed... URL: From andyfrommk at gmail.com Sat Nov 24 14:29:28 2012 From: andyfrommk at gmail.com (Andy Selby) Date: Sat, 24 Nov 2012 22:29:28 +0000 Subject: one-liner to Concatenate Vcard names and numbers Message-ID: After watching a guy on the news talk about flood preparedness and a need to have a papercopy of your contacts phone numbers I came up with this one-liner: perl -ne '/FN:/ && print, /TEL;/ && print' *.vcf > ~/vcardsinfo.txt You may need to switch the two regexs as fields are not always in the same order, also contacts with no telephone number show up! Andy -------------- next part -------------- An HTML attachment was scrubbed... URL: From hypothecate2012-pirates at yahoo.co.uk Mon Nov 26 03:27:28 2012 From: hypothecate2012-pirates at yahoo.co.uk (hypothecate2012-pirates at yahoo.co.uk) Date: Mon, 26 Nov 2012 11:27:28 +0000 (GMT) Subject: Paper lists and MK flooding In-Reply-To: References: Message-ID: <1353929248.43982.YahooMailNeo@web87702.mail.ir2.yahoo.com> A poly folder with a few pockets filled with single A4 sheets covered in? passwords / account details next to where you compute is a good tip. It is more secure than any device with network access and good back up. Milton Keynes should be in general OK this time, the drainage system was engineered for a much larger city that did not happen - I had to do some background reading for a water resources course I did at Cranfield a while ago. Be lucky, we are of course doomed by the end of the century in any case +6 Celsius is now unavoidable. http://www.youtube.com/watch?gl=GB&hl=en-GB&v=jHPOzQzk9Qo ________________________________ From: "miltonkeynes-pm-request at pm.org" To: miltonkeynes-pm at pm.org Sent: Sunday, 25 November 2012, 20:00 Subject: MiltonKeynes-pm Digest, Vol 86, Issue 6 Send MiltonKeynes-pm mailing list submissions to ??? miltonkeynes-pm at pm.org To subscribe or unsubscribe via the World Wide Web, visit ??? http://mail.pm.org/mailman/listinfo/miltonkeynes-pm or, via email, send a message with subject or body 'help' to ??? miltonkeynes-pm-request at pm.org You can reach the person managing the list at ??? miltonkeynes-pm-owner at pm.org When replying, please edit your Subject line so it is more specific than "Re: Contents of MiltonKeynes-pm digest..." Today's Topics: ? 1. one-liner to Concatenate Vcard names and numbers (Andy Selby) ---------------------------------------------------------------------- Message: 1 Date: Sat, 24 Nov 2012 22:29:28 +0000 From: Andy Selby To: Milton Keynes Perl Mongers Subject: one-liner to Concatenate Vcard names and numbers Message-ID: ??? Content-Type: text/plain; charset="iso-8859-1" After watching a guy on the news talk about flood preparedness and a need to have a papercopy of your contacts phone numbers I came up with this one-liner: perl -ne '/FN:/ && print, /TEL;/ && print' *.vcf > ~/vcardsinfo.txt You may need to switch the two regexs as fields are not always in the same order, also contacts with no telephone number show up! Andy -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Subject: Digest Footer _______________________________________________ MiltonKeynes-pm mailing list MiltonKeynes-pm at pm.org http://mail.pm.org/mailman/listinfo/miltonkeynes-pm ------------------------------ End of MiltonKeynes-pm Digest, Vol 86, Issue 6 ********************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: