in reply to regexp, substitution and the "pipe symbol"
Cheers - L~R#!/usr/bin/perl -w use strict; my $string = 'column1 |column two |might be column3'; my @columns = split /\|/ , $string , -1; $_ =~ s/\s+$// for @columns; $string = join '|' , @columns;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: regexp, substitution and the "pipe symbol"
by Abigail-II (Bishop) on Jan 29, 2004 at 16:21 UTC |