Abigail#!/usr/bin/perl use strict; use warnings; my $str = "123456"; $_ = $str; 1 while s/(\d)(\d)(\d)/$3$2/; print "$_\n"; $_ = $str; 1 while s/(\d)(\d)(\d)/$3$2/g; print "$_\n"; __END__ 62 52
In reply to Re: Global regex giving up too soon
by Abigail-II
in thread Global regex giving up too soon
by Wassercrats
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |