|
||||||
| Perl Discussion for the PERL language - Practical Extraction and Reporting Language, is a programming language often used for creating CGI programs. |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
I'm using this code to split:
Perl Code:
but I get this error: "Quantifier follows nothing in regex; marked by <-- HERE in m/* <-- HERE / at c:\projects\line_split.pl line 31" Any ideas how to fix this or why this error is generated? I can split with: Perl Code:
and everything works fine. |
| Sponsored Links |
|
|
|
|||
|
'*' is a quantifier, it means: zero or more when used in a regular expression, which is what split(//) is. If you want to split on a literal * you have to escape it:
@code = split(/\*/, $my_lines); or use single-quotes: @code = split('*', $my_lines); |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Php error handling | Jaan | PHP Tutorials | 3 | 09-07-2008 01:19 PM |
| need urgent help finding parce error!!! | siren | C and C++ | 3 | 09-13-2007 10:45 AM |
| Download problem, internal Server Error | j3cubcapt | ionFiles | 1 | 07-02-2007 10:45 AM |
| Php - CGI Error | thesquirrel16 | General Programming | 1 | 05-19-2007 06:09 PM |
| can someone help me with my c librarys? | bobwrit | C and C++ | 4 | 04-27-2007 07:19 PM |
| WingedPanther | ........ | 2753.6 |
| Xav | ........ | 2704 |
| Brandon W | ........ | 1702.32 |
| John | ........ | 1207.73 |
| marwex89 | ........ | 1175.24 |
| morefood2001 | ........ | 966.05 |
| dcs | ........ | 655.75 |
| Steve.L | ........ | 475.59 |
| orjan | ........ | 418.58 |
| Aereshaa | ........ | 383.54 |
Goal: 100,000 Posts
Complete: 98%