#!/usr/bin/perl use strict; my $i = 1; my $list_vcf_file = @ARGV[0]; open(LISTVCF, $list_vcf_file); while() { if (/(^BEGIN:VCARD\r\n$)/) { open(ENTRY, ">./$i.vcf"); print ENTRY $1; } elsif (/(^\r\n$)/) { print ENTRY $1; close ENTRY; print "Initiating vCard transmission #$i...\n"; print `ircp $i.vcf 2>&1`; print "Hit any key for next transmission....\n"; use Term::ReadKey; ReadMode('cbreak'); my $key; while (not defined ($key = ReadKey(0))) { 1; } ReadMode('normal'); $i++; } elsif (/(^END:VCARD\r\n$)/) { print ENTRY $1; } else { s/FN/X-EV2NOKI-ORIG-FN/; s/X-EVOLUTION-FILE-AS/FN/; print ENTRY $_; } } close LISTVCF; print "\nDone.";