Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^3: Finding error: uninitialized value in concatenation?

by tall_man (Parson)
on Mar 02, 2005 at 23:36 UTC ( [id://436032] : note . print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use strict;
     
    ...
    # Note: You should  use '\1' rather than '$1'.
    $sequence =~ s/(\S{1,80})/\1\n/g;
    print "*",$sequence,"*\n";
    
  2. or download this
    *This
     is
    ...
     nice
     line
     *
    
  3. or download this
    use strict;
     
    ...
    my @seq = ($len > 0) ? unpack("(A80)$len A*",$sequence) : $sequence;
     
    print "*",join("\n",@seq),"*\n";