Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Re: Re: Re: Re: Find common prefix from a list of strings

by Jenda (Abbot)
on Jul 15, 2003 at 12:09 UTC ( #274373=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $combined =~ s/[^\x00].*//;
    
  2. or download this
    ¢¼combined=0c0d060a183672756e33 (”Ļ
    ”č6run3)
    $combined=0a183672756e33 (
    ”č6run3)
    Prefix is "model4r"
    
  3. or download this
    ...
    $combined =~ s/[^\x00].*//s;
    ...
    
  4. or download this
    $combined =~ /^(\x00*)/;
    my $prefix = substr($first, 0, length($1));
    print qq{Prefix is "$prefix"};
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://274373]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2020-02-16 20:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What numbers are you going to focus on primarily in 2020?










    Results (70 votes). Check out past polls.

    Notices?