Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PRINT

Status
Not open for further replies.

Nova980

Technical User
May 20, 2009
40
US
Thanks in advance,

I'd like to print only the first 25 characters of a 40 character line from error.log/@lines.

Code:
 if (@lines) {
   open FILE_LOG, ">", "error.log" or die $!;
   print FILE_LOG @lines;
}

How can I output only the first 25 characters (redundant).

Happy 4th of June
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top