Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: chop from front and back

by kcott (Chancellor)
on Jun 21, 2013 at 07:25 UTC ( #1040095=note: print w/replies, xml ) Need Help??


in reply to chop from front and back

G'day torres09,

Something like this:

$ perl -Mstrict -Mwarnings -le ' my $x = q{"abc}; my $y = q{def"}; print substr $x . $y, 1, -1; ' abcdef

-- Ken

Replies are listed 'Best First'.
Re^2: chop from front and back
by torres09 (Acolyte) on Jun 21, 2013 at 07:53 UTC

    what if I wish to print it as abc,def

      print substr "$x,$y", 1, -1;
      لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1040095]
help
Chatterbox?
[Discipulus]: molex connectors? auto products must have lots of them
[Discipulus]: auto products stores..

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (7)
As of 2017-11-19 20:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (282 votes). Check out past polls.

    Notices?