473,787 Members | 2,989 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Perl Help - Split a string (UK based)

1 New Member
Hi,

Just coming back to perl after some time off, I think I need to use the split funtion.

I want to convert $username=FEL\m att.honston, to $username=matt. honston and remove or split the FEL\ from the string (yes I'm using the whoaim command in XP)

I know I need to use the split function, but just can't to remember the syntax.


Thanks,

Monkey :)
Jun 8 '06 #1
2 2503
ghostdog74
511 Recognized Expert Contributor
Hi,

Just coming back to perl after some time off, I think I need to use the split funtion.

I want to convert $username=FEL\m att.honston, to $username=matt. honston and remove or split the FEL\ from the string (yes I'm using the whoaim command in XP)

I know I need to use the split function, but just can't to remember the syntax.


Thanks,

Monkey :)
...on the command line type
perldoc -f split
Jun 9 '06 #2
pavan pothuru
3 New Member
hi, i am pavan. split function example for ur username.

($a,$b)=split(/\/,$username);
Aug 18 '06 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

5
31181
by: Stu Cazzo | last post by:
I have the following: String myStringArray; String myString = "98 99 100"; I want to split up myString and put it into myStringArray. If I use this: myStringArray = myString.split(" "); it will split myString up using the delimiter of 1 space so that
9
3218
by: Xah Lee | last post by:
# -*- coding: utf-8 -*- # Python # Matching string patterns # # Sometimes you want to know if a string is of # particular pattern. Let's say in your website # you have converted all images files from gif # format to png format. Now you need to change the # html code to use the .png files. So, essentially
11
29826
by: | last post by:
Hello everyone! :-D OK, I've came across many functions for this, but none works! I need one that works like this: StringSplit(string str, string delim, vector<string> results) Either with strings or char arrays, doesn't matter... anyone know? Thanks in advance!
7
2369
by: Matt | last post by:
I am attempting to reformat a string, inserting newlines before certain phrases. For example, in formatting SQL, I want to start a new line at each JOIN condition. Noting that strings are immutable, I thought it best to spllit the string at the key points, then join with '\n'. Regexps can seem the best way to identify the points in the string ('LEFT.*JOIN' to cover 'LEFT OUTER JOIN' and 'LEFT JOIN'), since I need to identify multiple...
2
1509
by: Belize | last post by:
Hi. Essence of problem in the following: Here is lines in utf8 of this form "BZ?ツーリTV%ツキDVD" Is it possible to split them into the fragments that contain only latin printable symbols (aplhabet + "?#" etc) and fragments with the hieroglyphs, so it could be like this ? Then, after translate of hieroglyphs, necessary to join line, so it could be like this "BZ? navigation TV% display DVD"
1
1583
by: Andrew Savige | last post by:
Python beginner here. For a string 'ABBBCC', I want to produce a list . That is, break the string into pieces based on change of character. What's the best way to do this in Python? Using Python 2.5.1, I tried: import re s = re.split(r'(?<=(.))(?!\1)', 'ABBBCC')
5
2534
by: shaiful | last post by:
Hi all I have a simple problem with string. I want to split string, such as: dim s as string dim k(3) as string s="aa1,bv1,cc1,dt1" i want to split the value in k, k(0)=aa1 k(1)=bv1 k(2)=cc1 k(3)=dt1
4
10274
by: dmitrey | last post by:
hi all, howto split string with both comma and semicolon delimiters? i.e. (for example) get from string "a,b;c" I have tried s.split(',;') but it don't work Thx, D.
4
7736
by: N9 | last post by:
Hi Anyone who can help about split string. string text = "History about a boy, who loves to play baseball with his friends." I like to find indexOf "play" and read the string 10 char left and 10 char right
6
3068
by: Adam Tippelt | last post by:
I've got a form that allows users to "save the current record to drafts" if they haven't finished writing all the data for that record. This saves it in it's current state, which puts it in a temporary table. The record is also tagged with the name of the user who created it. What I'm trying to do is to force the form to open up and load this record when the form is loaded/opened. The structure of the database only allows users to have one...
0
9655
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
10110
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8993
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7517
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6749
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5398
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4067
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3670
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.