|
||||||
| 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 12:19 PM |
| need urgent help finding parce error!!! | siren | C and C++ | 3 | 09-13-2007 09:45 AM |
| Download problem, internal Server Error | j3cubcapt | ionFiles | 1 | 07-02-2007 09:45 AM |
| Php - CGI Error | thesquirrel16 | General Programming | 1 | 05-19-2007 05:09 PM |
| can someone help me with my c librarys? | bobwrit | C and C++ | 4 | 04-27-2007 06:19 PM |
| Xav | ........ | 1357.94 |
| MeTh0Dz|Reb0rn | ........ | 1077.71 |
| WingedPanther | ........ | 919.18 |
| marwex89 | ........ | 906.86 |
| morefood2001 | ........ | 900.18 |
| John | ........ | 890.77 |
| Brandon W | ........ | 770.65 |
| chili5 | ........ | 312.39 |
| Steve.L | ........ | 264.99 |
| dcs | ........ | 232.34 |
Goal: 100,000 Posts
Complete: 83%