Re: parsing character by character and printing

2001-06-19 Thread Aaron Craig
In general, I would urge you to read the built-in functions for strings and scalars in the Perl documentation. That said, an easy way to get the first fifty characters of a string (ie a substring of a string) use my $substring = substr($row, 0, 50); # $row is the string, 0 is the starting poin

Re: parsing character by character and printing

2001-06-19 Thread Aaron Craig
In general, I would urge you to read the built-in functions for strings and scalars in the Perl documentation. That said, an easy way to get the first fifty characters of a string (ie a substring of a string) use my $substring = substr($row, 0, 50); # $row is the string, 0 is the starting poin

RE: parsing character by character and printing

2001-06-19 Thread mark crowe (JIC)
>I am trying to figure out how I can parse a row, character by >character, that I have retrieved from a database. You could try something like this: while ($row) { # while there are still characters left to look at ($char) = $row =~ s/(\w)//; # Removes the first word character of

parsing character by character and printing

2001-06-18 Thread Brian Jackson
I am completely new to Perl. I am trying to figure out how I can parse a row, character by character, that I have retrieved from a database. I would like to format output based on characters from the row. For example I may have retrieved 250 character string from a database and I want to print