SPL Debug: 0: /* SPL Debug: 1: * SPL - The SPL Programming Language SPL Debug: 2: * Copyright (C) 2004, 2005 Clifford Wolf SPL Debug: 3: * SPL Debug: 4: * This program is free software; you can redistribute it and/or modify SPL Debug: 5: * it under the terms of the GNU General Public License as published by SPL Debug: 6: * the Free Software Foundation; either version 2 of the License, or SPL Debug: 7: * (at your option) any later version. SPL Debug: 8: * SPL Debug: 9: * This program is distributed in the hope that it will be useful, SPL Debug: 10: * but WITHOUT ANY WARRANTY; without even the implied warranty of SPL Debug: 11: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the SPL Debug: 12: * GNU General Public License for more details. SPL Debug: 13: * SPL Debug: 14: * You should have received a copy of the GNU General Public License SPL Debug: 15: * along with this program; if not, write to the Free Software SPL Debug: 16: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA SPL Debug: 17: * SPL Debug: 18: * example55.spl: simple example for parsing a file line by line using a regex SPL Debug: 19: */ SPL Debug: 20: SPL Debug: 21: // SKIP_IF_NO_REGEX SPL Debug: 22: SPL Debug: 23: load "file"; SPL Debug: 24: SPL Debug: 25: var file = file_read("example55.spl"); SPL Debug: 26: var lines = file =~ /.*?(?=\n)/Ag; SPL Debug: 27: SPL Debug: 28: foreach i (lines) SPL Debug: 29: debug "$i: ${lines[i]}"; SPL Debug: 30: