Help for this page

Select Code to Download


  1. or download this
    c:\test>perl -E"chop for 'fred'; print 'here' "
    Modification of a read-only value attempted at -e line 1.
    
    c:\test>perl -E"eval{ chop; } for 'fred'; print 'here' "
    here
    
  2. or download this
    c:\test>perl -E"chop 'fred'; print 'here' "
    Can't modify constant item in chop at -e line 1, near "'fred';"
    ...
    c:\test>perl -E"eval{ chop 'fred' }; print 'here' "
    Can't modify constant item in chop at -e line 1, near "'fred' }"
    Execution of -e aborted due to compilation errors.