Changeset 3418 for trunk/gsdl/perllib
- Timestamp:
- 2002-09-10T19:15:46+12:00 (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/perllib/cfgread.pm
r2772 r3418 39 39 $line =~ s/\cM|\cJ//g; # remove end-of-line characters 40 40 $line =~ s/^\s+//; # remove initial white space 41 # Merge with following line if a quoted phrase is left un-closed. 42 if ($line =~ m/[^\\]\"/) { 43 while ($line !~ m/\"(.*?[^\\])?\"/) { 44 my $nextline = <$handle>; 45 if (defined($nextline)) { 46 $nextline =~ s/\r?\n//; # remove end-of-line 47 $line .= " " . $nextline; 48 } else { 49 return undef; # parse error? 50 } 51 } 52 } 41 53 $linecontinues = $line =~ s/\\$//; 54 42 55 while ($line =~ s/\s*(\"[^\"]*\"|\'[^\']*\'|\S+)\s*//) { 43 56 if (defined $1) {
Note:
See TracChangeset
for help on using the changeset viewer.