title: Complex regular subexpression recursion limit (32766) exceeded at
body: <p>I have a perl script which performs a <code>pgrep</code> as follows:</p>
  
  <pre><code>use warnings;
  
  my  @instance = `pgrep -fl varnish`;
  foreach my $line (@instance) {
  my $ip;
          my $port;
          my $pid;
          my $pidfile;
          my $fileconfiguration;
          my $bakendhost;
          my $bakendport;
          my $sharememory;
          my $user;
  
          chomp $line;
          if ($line =~ m/-T\s+([0-9]+.*)+:(\d+)\s+/) {
             $ip = $1;
             $port = $2;
          }
  }
  </code></pre>
  
  <p>However when launch the script am having the following error/warning:</p>
  
  <blockquote>
    <p>Complex regular subexpression recursion limit (32766) exceeded at
    /home/k.sewnundun/test.pl line 16. </p>
    
    <p>Complex regular subexpression recursion limit (32766) exceeded at /home/k.sewnundun/test.pl line
    16.</p>
  </blockquote>
  
  <p>Please find below the debug:</p>
  
  <pre><code>Loading DB routines from perl5db.pl version 1.32
  Editor support available.
  
  Enter h or `h h' for help, or `man perldebug' for more help.
  
  main::(/home/k.sewnundun/test.pl:3):
  3:      my  @instance = `pgrep -fl varnish`;
    DB&lt;1&gt; n
  main::(/home/k.sewnundun/test.pl:4):
  4:      foreach my $line (@instance) {
    DB&lt;1&gt; n
  main::(/home/k.sewnundun/test.pl:5):
  5:      my $ip;
    DB&lt;1&gt; print $line
  3066 /opt/rh/varnish4/root/usr/sbin/varnishd -P /var/run-daemon/varnishd-toto4.pid -a 0.0.0.0:8080 -f /etc/varnish/etc/toto4/toto4-current.vcl -u varnish4-toto4 -g varnish4-toto4 -l 80M -T 0.0.0.0:38080 -p thread_pool_min=50 -p thread_pool_max=1000 -p thread_pool_timeout=120 -p vcl_dir=/etc/varnish/etc/toto4 -n /home/varnish/toto4/working -s malloc, -S /etc/varnish/etc/toto4/toto4.secret
  
    DB&lt;2&gt; n
  main::(/home/k.sewnundun/test.pl:6):
  6:              my $port;
    DB&lt;2&gt; n
  main::(/home/k.sewnundun/test.pl:7):
  7:              my $pid;
    DB&lt;2&gt; n
  main::(/home/k.sewnundun/test.pl:8):
  8:              my $pidfile;
    DB&lt;2&gt; n
  main::(/home/k.sewnundun/test.pl:9):
  9:              my $fileconfiguration;
    DB&lt;2&gt; n
  main::(/home/k.sewnundun/test.pl:10):
  10:             my $bakendhost;
    DB&lt;2&gt; n
  main::(/home/k.sewnundun/test.pl:11):
  11:             my $bakendport;
    DB&lt;2&gt; n
  main::(/home/k.sewnundun/test.pl:12):
  12:             my $sharememory;
    DB&lt;2&gt; n
  main::(/home/k.sewnundun/test.pl:13):
  13:             my $user;
    DB&lt;2&gt; n
  main::(/home/k.sewnundun/test.pl:15):
  15:             chomp $line;
    DB&lt;2&gt; n
  main::(/home/k.sewnundun/test.pl:16):
  16:             if ($line =~ m/-T\s+([0-9]+.*)+:(\d+)\s+/) {
    DB&lt;2&gt; n
  main::(/home/k.sewnundun/test.pl:17):
  17:                $ip = $1;
    DB&lt;2&gt; n
  main::(/home/k.sewnundun/test.pl:18):
  18:                $port = $2;
    DB&lt;2&gt; n
  main::(/home/k.sewnundun/test.pl:5):
  5:      my $ip;
    DB&lt;2&gt; print $line
  3078 /opt/rh/varnish4/root/usr/sbin/varnishd -P /var/run-daemon/varnishd-toto4.pid -a 0.0.0.0:8080 -f /etc/varnish/etc/toto4/toto4-current.vcl -u varnish4-toto4 -g varnish4-toto4 -l 80M -T 0.0.0.0:38080 -p thread_pool_min=50 -p thread_pool_max=1000 -p thread_pool_timeout=120 -p vcl_dir=/etc/varnish/etc/toto4 -n /home/varnish/toto4/working -s malloc, -S /etc/varnish/etc/toto4/toto4.secret
  
    DB&lt;3&gt; n
  main::(/home/k.sewnundun/test.pl:6):
  6:              my $port;
    DB&lt;3&gt; n
  main::(/home/k.sewnundun/test.pl:7):
  7:              my $pid;
    DB&lt;3&gt; n
  main::(/home/k.sewnundun/test.pl:8):
  8:              my $pidfile;
    DB&lt;3&gt; n
  main::(/home/k.sewnundun/test.pl:9):
  9:              my $fileconfiguration;
    DB&lt;3&gt; n
  main::(/home/k.sewnundun/test.pl:10):
  10:             my $bakendhost;
    DB&lt;3&gt; n
  main::(/home/k.sewnundun/test.pl:11):
  11:             my $bakendport;
    DB&lt;3&gt; n
  main::(/home/k.sewnundun/test.pl:12):
  12:             my $sharememory;
    DB&lt;3&gt; n
  main::(/home/k.sewnundun/test.pl:13):
  13:             my $user;
    DB&lt;3&gt; n
  main::(/home/k.sewnundun/test.pl:15):
  15:             chomp $line;
    DB&lt;3&gt; n
  main::(/home/k.sewnundun/test.pl:16):
  16:             if ($line =~ m/-T\s+([0-9]+.*)+:(\d+)\s+/) {
    DB&lt;3&gt; n
  main::(/home/k.sewnundun/test.pl:17):
  17:                $ip = $1;
    DB&lt;3&gt; n
  main::(/home/k.sewnundun/test.pl:18):
  18:                $port = $2;
    DB&lt;3&gt; n
  main::(/home/k.sewnundun/test.pl:5):
  5:      my $ip;
    DB&lt;3&gt; print $line
  3200 /opt/rh/varnish4/root/usr/bin/varnishncsa -a -n toto4 -w /home/logs/varnish/toto4/access.log -D -P /var/run-daemon/varnishncsa-toto4.pid -F %{X-Forwarded-For}i %h %l %u %t "%r" %s %b "%{Referer}i" "%{User-agent}i"
  
    DB&lt;4&gt; n
  main::(/home/k.sewnundun/test.pl:6):
  6:              my $port;
    DB&lt;4&gt; n
  main::(/home/k.sewnundun/test.pl:7):
  7:              my $pid;
    DB&lt;4&gt; n
  main::(/home/k.sewnundun/test.pl:8):
  8:              my $pidfile;
    DB&lt;4&gt; n
  main::(/home/k.sewnundun/test.pl:9):
  9:              my $fileconfiguration;
    DB&lt;4&gt; n
  main::(/home/k.sewnundun/test.pl:10):
  10:             my $bakendhost;
    DB&lt;4&gt; n
  main::(/home/k.sewnundun/test.pl:11):
  11:             my $bakendport;
    DB&lt;4&gt; n
  main::(/home/k.sewnundun/test.pl:12):
  12:             my $sharememory;
    DB&lt;4&gt; n
  main::(/home/k.sewnundun/test.pl:13):
  13:             my $user;
    DB&lt;4&gt; n
  main::(/home/k.sewnundun/test.pl:15):
  15:             chomp $line;
    DB&lt;4&gt; n
  main::(/home/k.sewnundun/test.pl:16):
  16:             if ($line =~ m/-T\s+([0-9]+.*)+:(\d+)\s+/) {
    DB&lt;4&gt; n
  main::(/home/k.sewnundun/test.pl:5):
  5:      my $ip;
    DB&lt;4&gt; print $line
  9803 varnishd -P /var/run-daemon/varnishd-varnish.pid -a 0.0.0.0:80 -f /etc/varnish/varnish.com/varnish.vcl -u varnish-varnish -l 80M -T 127.0.0.1:33080 -w 200,500,120 -n /home/varnish/varnish/working -s malloc,1G -p user varnish-varnish -p acceptor_sleep_decay 0.9 -p acceptor_sleep_incr 0.001 -p acceptor_sleep_max 0.05 -p auto_restart on -p ban_lurker_sleep 0.0 -p between_bytes_timeout 60.0 -p cli_buffer 8192 -p cli_timeout 5 -p clock_skew 10 -p connect_timeout 0.4 -p critbit_cooloff 180.0 -p default_grace 10 -p default_ttl 120 -p diag_bitmap 0x0 -p esi_syntax 0 -p expiry_sleep 1.0 -p fetch_chunksize 128 -p first_byte_timeout 60.0 -p group varnish-varnish -p http_range_support off -p listen_depth 1024 -p log_hashstring off -p log_local_address off -p lru_interval 2 -p max_esi_depth 5 -p max_restarts 4 -p ping_interval 3 -p pipe_timeout 60 -p prefer_ipv6 off -p queue_max 100 -p rush_exponent 3 -p saintmode_threshold 10 -p send_timeout 600 -p sess_timeout 5 -p sess_workspace 16384 -p session_linger 50 -p session_max 10000 -p shm_reclen 255 -p shm_workspace 8192 -p syslog_cli_traffic on -p vcl_trace off -p vcl_dir  -p waiter default
  
    DB&lt;5&gt; n
  main::(/home/k.sewnundun/test.pl:6):
  6:              my $port;
    DB&lt;5&gt; n
  main::(/home/k.sewnundun/test.pl:7):
  7:              my $pid;
    DB&lt;5&gt; n
  main::(/home/k.sewnundun/test.pl:8):
  8:              my $pidfile;
    DB&lt;5&gt; n
  
  main::(/home/k.sewnundun/test.pl:9):
  9:              my $fileconfiguration;
    DB&lt;5&gt; main::(/home/k.sewnundun/test.pl:10):
  10:             my $bakendhost;
    DB&lt;5&gt; n
  main::(/home/k.sewnundun/test.pl:11):
  11:             my $bakendport;
    DB&lt;5&gt; n
  main::(/home/k.sewnundun/test.pl:12):
  12:             my $sharememory;
    DB&lt;5&gt; n
  main::(/home/k.sewnundun/test.pl:13):
  13:             my $user;
    DB&lt;5&gt; n
  main::(/home/k.sewnundun/test.pl:15):
  15:             chomp $line;
    DB&lt;5&gt; n
  main::(/home/k.sewnundun/test.pl:16):
  16:             if ($line =~ m/-T\s+([0-9]+.*)+:(\d+)\s+/) {
    DB&lt;5&gt; n
  Complex regular subexpression recursion limit (32766) exceeded at /home/k.sewnundun/test.pl line 16.
   at /home/k.sewnundun/test.pl line 16
  main::(/home/k.sewnundun/test.pl:17):
  17:                $ip = $1;
    DB&lt;5&gt; q
  </code></pre>
  
  <p>What could be the issue? Thanks</p>