Re: Wanted: Help performing Date-Time Arithmetic using emacs/vi and perl

2016-04-19 Thread Shlomi Fish
Hi Richard, On Tue, 19 Apr 2016 04:58:32 + (UTC) Richard Heintze via beginners wrote: >   I just love using viper mode in emacs to execute perl: > .! perl -MPOSIX -pe ' BEGIN{ $np = qr{ \( (?: (?> [^()]+ ) | (??{ $np }) )* > \) }x;$funpat = qr/$np/;} s/($funpat)=(.*)$/"$1=$3".eval($1)."$4"/g

Wanted: Help performing Date-Time Arithmetic using emacs/vi and perl

2016-04-18 Thread Richard Heintze via beginners
  I just love using viper mode in emacs to execute perl: .! perl -MPOSIX -pe ' BEGIN{ $np = qr{ \( (?: (?> [^()]+ ) | (??{ $np }) )* \) }x;$funpat = qr/$np/;} s/($funpat)=(.*)$/"$1=$3".eval($1)."$4"/ge' This command searches for a balanced set of parens (from the camel book) followed by an equal